| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/webui/options2/chromeos/change_picture_options_handl
er2.h" | 5 #include "chrome/browser/ui/webui/options2/chromeos/change_picture_options_handl
er2.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 | 323 |
| 324 void ChangePictureOptionsHandler::OnCameraPresenceCheckDone() { | 324 void ChangePictureOptionsHandler::OnCameraPresenceCheckDone() { |
| 325 SetCameraPresent(CameraDetector::camera_presence() == | 325 SetCameraPresent(CameraDetector::camera_presence() == |
| 326 CameraDetector::kCameraPresent); | 326 CameraDetector::kCameraPresent); |
| 327 } | 327 } |
| 328 | 328 |
| 329 void ChangePictureOptionsHandler::Observe( | 329 void ChangePictureOptionsHandler::Observe( |
| 330 int type, | 330 int type, |
| 331 const content::NotificationSource& source, | 331 const content::NotificationSource& source, |
| 332 const content::NotificationDetails& details) { | 332 const content::NotificationDetails& details) { |
| 333 ::options2::OptionsPageUIHandler::Observe(type, source, details); | 333 OptionsPageUIHandler::Observe(type, source, details); |
| 334 if (type == chrome::NOTIFICATION_PROFILE_IMAGE_UPDATED) { | 334 if (type == chrome::NOTIFICATION_PROFILE_IMAGE_UPDATED) { |
| 335 // User profile image has been updated. | 335 // User profile image has been updated. |
| 336 SendProfileImage(*content::Details<const SkBitmap>(details).ptr(), false); | 336 SendProfileImage(*content::Details<const SkBitmap>(details).ptr(), false); |
| 337 } | 337 } |
| 338 } | 338 } |
| 339 | 339 |
| 340 gfx::NativeWindow ChangePictureOptionsHandler::GetBrowserWindow() const { | 340 gfx::NativeWindow ChangePictureOptionsHandler::GetBrowserWindow() const { |
| 341 Browser* browser = | 341 Browser* browser = |
| 342 BrowserList::FindBrowserWithProfile(Profile::FromWebUI(web_ui())); | 342 BrowserList::FindBrowserWithProfile(Profile::FromWebUI(web_ui())); |
| 343 if (!browser) | 343 if (!browser) |
| 344 return NULL; | 344 return NULL; |
| 345 return browser->window()->GetNativeHandle(); | 345 return browser->window()->GetNativeHandle(); |
| 346 } | 346 } |
| 347 | 347 |
| 348 } // namespace options2 | 348 } // namespace options2 |
| 349 } // namespace chromeos | 349 } // namespace chromeos |
| OLD | NEW |