| 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 #ifndef CHROME_BROWSER_CHROMEOS_OPTIONS_TAKE_PHOTO_DIALOG_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_OPTIONS_TAKE_PHOTO_DIALOG_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_OPTIONS_TAKE_PHOTO_DIALOG_H_ | 6 #define CHROME_BROWSER_CHROMEOS_OPTIONS_TAKE_PHOTO_DIALOG_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" |
| 9 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/observer_list.h" | 11 #include "base/observer_list.h" |
| 11 #include "chrome/browser/chromeos/login/camera_controller.h" | 12 #include "chrome/browser/chromeos/login/camera_controller.h" |
| 12 #include "chrome/browser/chromeos/login/take_photo_view.h" | 13 #include "chrome/browser/chromeos/login/take_photo_view.h" |
| 13 #include "content/public/browser/notification_observer.h" | 14 #include "content/public/browser/notification_observer.h" |
| 14 #include "content/public/browser/notification_registrar.h" | 15 #include "content/public/browser/notification_registrar.h" |
| 15 #include "ui/views/window/dialog_delegate.h" | 16 #include "ui/views/window/dialog_delegate.h" |
| 16 | 17 |
| 17 namespace views { | 18 namespace views { |
| 18 class View; | 19 class View; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 void AddObserver(Observer* obs); | 82 void AddObserver(Observer* obs); |
| 82 void RemoveObserver(Observer* obs); | 83 void RemoveObserver(Observer* obs); |
| 83 | 84 |
| 84 void NotifyOnCaptureSuccess(); | 85 void NotifyOnCaptureSuccess(); |
| 85 void NotifyOnCaptureFailure(); | 86 void NotifyOnCaptureFailure(); |
| 86 void NotifyOnCapturingStopped(); | 87 void NotifyOnCapturingStopped(); |
| 87 | 88 |
| 88 // content::NotificationObserver implementation: | 89 // content::NotificationObserver implementation: |
| 89 virtual void Observe(int type, | 90 virtual void Observe(int type, |
| 90 const content::NotificationSource& source, | 91 const content::NotificationSource& source, |
| 91 const content::NotificationDetails& details); | 92 const content::NotificationDetails& details) OVERRIDE; |
| 92 | 93 |
| 93 protected: | 94 protected: |
| 94 // views::View overrides: | 95 // views::View overrides: |
| 95 virtual void Layout(); | 96 virtual void Layout() OVERRIDE; |
| 96 virtual gfx::Size GetPreferredSize(); | 97 virtual gfx::Size GetPreferredSize() OVERRIDE; |
| 97 | 98 |
| 98 private: | 99 private: |
| 99 // Starts initializing the camera and shows the appropriate status on the | 100 // Starts initializing the camera and shows the appropriate status on the |
| 100 // screen. | 101 // screen. |
| 101 void InitCamera(); | 102 void InitCamera(); |
| 102 | 103 |
| 103 TakePhotoView* take_photo_view_; | 104 TakePhotoView* take_photo_view_; |
| 104 | 105 |
| 105 CameraController camera_controller_; | 106 CameraController camera_controller_; |
| 106 | 107 |
| 107 content::NotificationRegistrar registrar_; | 108 content::NotificationRegistrar registrar_; |
| 108 | 109 |
| 109 Delegate* delegate_; | 110 Delegate* delegate_; |
| 110 | 111 |
| 111 ObserverList<Observer> observer_list_; | 112 ObserverList<Observer> observer_list_; |
| 112 | 113 |
| 113 DISALLOW_COPY_AND_ASSIGN(TakePhotoDialog); | 114 DISALLOW_COPY_AND_ASSIGN(TakePhotoDialog); |
| 114 }; | 115 }; |
| 115 | 116 |
| 116 } // namespace chromeos | 117 } // namespace chromeos |
| 117 | 118 |
| 118 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_TAKE_PHOTO_DIALOG_H_ | 119 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_TAKE_PHOTO_DIALOG_H_ |
| OLD | NEW |