OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_USER_IMAGE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USER_IMAGE_VIEW_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_IMAGE_VIEW_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_IMAGE_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "views/controls/button/button.h" | 9 #include "views/controls/button/button.h" |
10 #include "views/view.h" | 10 #include "views/view.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 | 45 |
46 // Updates image from camera. | 46 // Updates image from camera. |
47 void UpdateVideoFrame(const SkBitmap& frame); | 47 void UpdateVideoFrame(const SkBitmap& frame); |
48 | 48 |
49 // Overridden from views::View: | 49 // Overridden from views::View: |
50 virtual gfx::Size GetPreferredSize(); | 50 virtual gfx::Size GetPreferredSize(); |
51 | 51 |
52 // Overridden from views::ButtonListener. | 52 // Overridden from views::ButtonListener. |
53 virtual void ButtonPressed(views::Button* sender, const views::Event& event); | 53 virtual void ButtonPressed(views::Button* sender, const views::Event& event); |
54 | 54 |
| 55 protected: |
| 56 // views::View overrides: |
| 57 virtual void ViewHierarchyChanged(bool is_add, |
| 58 views::View* parent, |
| 59 views::View* child); |
| 60 |
55 private: | 61 private: |
56 // Initializes layout manager for this view. | 62 // Initializes layout manager for this view. |
57 void InitLayout(); | 63 void InitLayout(); |
58 | 64 |
59 views::Label* title_label_; | 65 views::Label* title_label_; |
60 views::NativeButton* ok_button_; | 66 views::NativeButton* ok_button_; |
61 views::NativeButton* skip_button_; | 67 views::NativeButton* skip_button_; |
62 views::ImageButton* snapshot_button_; | 68 views::ImageButton* snapshot_button_; |
63 views::ImageView* user_image_; | 69 views::ImageView* user_image_; |
64 | 70 |
65 // Notifications receiver. | 71 // Notifications receiver. |
66 Delegate* delegate_; | 72 Delegate* delegate_; |
67 | 73 |
68 // Indicates that we're in capturing mode. When |false|, new video frames | 74 // Indicates that we're in capturing mode. When |false|, new video frames |
69 // are not shown to user if received. | 75 // are not shown to user if received. |
70 bool is_capturing_; | 76 bool is_capturing_; |
71 | 77 |
72 // Last frame that was received from the camera in its original resolution. | 78 // Last frame that was received from the camera in its original resolution. |
73 scoped_ptr<SkBitmap> last_frame_; | 79 scoped_ptr<SkBitmap> last_frame_; |
74 | 80 |
75 DISALLOW_COPY_AND_ASSIGN(UserImageView); | 81 DISALLOW_COPY_AND_ASSIGN(UserImageView); |
76 }; | 82 }; |
77 | 83 |
78 } // namespace chromeos | 84 } // namespace chromeos |
79 | 85 |
80 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_IMAGE_VIEW_H_ | 86 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_IMAGE_VIEW_H_ |
81 | 87 |
OLD | NEW |