OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_LOGIN_TAKE_PHOTO_VIEW_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_TAKE_PHOTO_VIEW_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_TAKE_PHOTO_VIEW_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_TAKE_PHOTO_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "ui/views/controls/button/button.h" | 10 #include "ui/views/controls/button/button.h" |
11 #include "ui/views/view.h" | 11 #include "ui/views/view.h" |
12 | 12 |
13 class PhotoCaptureObserver; | 13 class PhotoCaptureObserver; |
14 class SkBitmap; | 14 class SkBitmap; |
15 | 15 |
| 16 namespace gfx { |
| 17 class ImageSkia; |
| 18 } // namespace gfx |
| 19 |
16 namespace views { | 20 namespace views { |
17 class ImageButton; | 21 class ImageButton; |
18 class Label; | 22 class Label; |
19 } // namespace views | 23 } // namespace views |
20 | 24 |
21 namespace chromeos { | 25 namespace chromeos { |
22 | 26 |
23 class CameraImageView; | 27 class CameraImageView; |
24 | 28 |
25 // View used for showing video from camera and taking a snapshot from it. | 29 // View used for showing video from camera and taking a snapshot from it. |
(...skipping 26 matching lines...) Expand all Loading... |
52 void ShowCameraInitializing(); | 56 void ShowCameraInitializing(); |
53 | 57 |
54 // If in capturing mode, shows that camera is broken instead of video | 58 // If in capturing mode, shows that camera is broken instead of video |
55 // frame and disables snapshot button until new frame is received. | 59 // frame and disables snapshot button until new frame is received. |
56 void ShowCameraError(); | 60 void ShowCameraError(); |
57 | 61 |
58 // Returns the currently selected image. | 62 // Returns the currently selected image. |
59 const SkBitmap& GetImage() const; | 63 const SkBitmap& GetImage() const; |
60 | 64 |
61 // Sets the image indicating that the view is used only for image preview. | 65 // Sets the image indicating that the view is used only for image preview. |
62 void SetImage(SkBitmap* image); | 66 void SetImage(gfx::ImageSkia* image); |
63 | 67 |
64 // Captures the image, as if the button was pressed. | 68 // Captures the image, as if the button was pressed. |
65 void CaptureImage(); | 69 void CaptureImage(); |
66 | 70 |
67 // Overridden from views::View: | 71 // Overridden from views::View: |
68 virtual gfx::Size GetPreferredSize() OVERRIDE; | 72 virtual gfx::Size GetPreferredSize() OVERRIDE; |
69 | 73 |
70 // Overridden from views::ButtonListener. | 74 // Overridden from views::ButtonListener. |
71 virtual void ButtonPressed(views::Button* sender, | 75 virtual void ButtonPressed(views::Button* sender, |
72 const views::Event& event) OVERRIDE; | 76 const views::Event& event) OVERRIDE; |
(...skipping 22 matching lines...) Expand all Loading... |
95 bool show_title_; | 99 bool show_title_; |
96 | 100 |
97 Delegate* delegate_; | 101 Delegate* delegate_; |
98 | 102 |
99 DISALLOW_COPY_AND_ASSIGN(TakePhotoView); | 103 DISALLOW_COPY_AND_ASSIGN(TakePhotoView); |
100 }; | 104 }; |
101 | 105 |
102 } // namespace chromeos | 106 } // namespace chromeos |
103 | 107 |
104 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_TAKE_PHOTO_VIEW_H_ | 108 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_TAKE_PHOTO_VIEW_H_ |
OLD | NEW |