| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_CHANGE_PICTURE_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_CHANGE_PICTURE_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_CHANGE_PICTURE_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_CHANGE_PICTURE_HANDLER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/scoped_observer.h" | 9 #include "base/scoped_observer.h" |
| 10 #include "chrome/browser/chromeos/camera_presence_notifier.h" | 10 #include "chrome/browser/chromeos/camera_presence_notifier.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 public ui::SelectFileDialog::Listener, | 34 public ui::SelectFileDialog::Listener, |
| 35 public content::NotificationObserver, | 35 public content::NotificationObserver, |
| 36 public ImageDecoder::ImageRequest, | 36 public ImageDecoder::ImageRequest, |
| 37 public CameraPresenceNotifier::Observer { | 37 public CameraPresenceNotifier::Observer { |
| 38 public: | 38 public: |
| 39 ChangePictureHandler(); | 39 ChangePictureHandler(); |
| 40 ~ChangePictureHandler() override; | 40 ~ChangePictureHandler() override; |
| 41 | 41 |
| 42 // WebUIMessageHandler implementation. | 42 // WebUIMessageHandler implementation. |
| 43 void RegisterMessages() override; | 43 void RegisterMessages() override; |
| 44 void OnJavascriptAllowed() override; |
| 45 void OnJavascriptDisallowed() override; |
| 44 | 46 |
| 45 // CameraPresenceNotifier::Observer implementation: | 47 // CameraPresenceNotifier::Observer implementation: |
| 46 void OnCameraPresenceCheckDone(bool is_camera_present) override; | 48 void OnCameraPresenceCheckDone(bool is_camera_present) override; |
| 47 | 49 |
| 48 private: | 50 private: |
| 49 // Sends list of available default images to the page. | 51 // Sends list of available default images to the page. |
| 50 void SendDefaultImages(); | 52 void SendDefaultImages(); |
| 51 | 53 |
| 52 // Sends current selection to the page. | 54 // Sends current selection to the page. |
| 53 void SendSelectedImage(); | 55 void SendSelectedImage(); |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 | 132 |
| 131 ScopedObserver<CameraPresenceNotifier, ChangePictureHandler> camera_observer_; | 133 ScopedObserver<CameraPresenceNotifier, ChangePictureHandler> camera_observer_; |
| 132 | 134 |
| 133 DISALLOW_COPY_AND_ASSIGN(ChangePictureHandler); | 135 DISALLOW_COPY_AND_ASSIGN(ChangePictureHandler); |
| 134 }; | 136 }; |
| 135 | 137 |
| 136 } // namespace settings | 138 } // namespace settings |
| 137 } // namespace chromeos | 139 } // namespace chromeos |
| 138 | 140 |
| 139 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_CHANGE_PICTURE_HANDLER_H_ | 141 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_CHANGE_PICTURE_HANDLER_H_ |
| OLD | NEW |