| OLD | NEW |
| 1 // Copyright (c) 2010 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_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" |
| 11 | 11 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // If in capturing mode, shows that camera is broken instead of video | 55 // If in capturing mode, shows that camera is broken instead of video |
| 56 // frame and disables snapshot button until new frame is received. | 56 // frame and disables snapshot button until new frame is received. |
| 57 void ShowCameraError(); | 57 void ShowCameraError(); |
| 58 | 58 |
| 59 // Overridden from views::View: | 59 // Overridden from views::View: |
| 60 virtual gfx::Size GetPreferredSize(); | 60 virtual gfx::Size GetPreferredSize(); |
| 61 | 61 |
| 62 // Overridden from views::ButtonListener. | 62 // Overridden from views::ButtonListener. |
| 63 virtual void ButtonPressed(views::Button* sender, const views::Event& event); | 63 virtual void ButtonPressed(views::Button* sender, const views::Event& event); |
| 64 | 64 |
| 65 protected: | |
| 66 // views::View overrides: | |
| 67 virtual void ViewHierarchyChanged(bool is_add, | |
| 68 views::View* parent, | |
| 69 views::View* child); | |
| 70 | |
| 71 private: | 65 private: |
| 72 // Initializes layout manager for this view. | 66 // Initializes layout manager for this view. |
| 73 void InitLayout(); | 67 void InitLayout(); |
| 74 | 68 |
| 75 views::Label* title_label_; | 69 views::Label* title_label_; |
| 76 views::NativeButton* ok_button_; | 70 views::NativeButton* ok_button_; |
| 77 views::NativeButton* skip_button_; | 71 views::NativeButton* skip_button_; |
| 78 views::ImageButton* snapshot_button_; | 72 views::ImageButton* snapshot_button_; |
| 79 CameraImageView* user_image_; | 73 CameraImageView* user_image_; |
| 80 | 74 |
| 81 // Notifications receiver. | 75 // Notifications receiver. |
| 82 Delegate* delegate_; | 76 Delegate* delegate_; |
| 83 | 77 |
| 84 // Indicates that we're in capturing mode. When |false|, new video frames | 78 // Indicates that we're in capturing mode. When |false|, new video frames |
| 85 // are not shown to user if received. | 79 // are not shown to user if received. |
| 86 bool is_capturing_; | 80 bool is_capturing_; |
| 87 | 81 |
| 88 DISALLOW_COPY_AND_ASSIGN(UserImageView); | 82 DISALLOW_COPY_AND_ASSIGN(UserImageView); |
| 89 }; | 83 }; |
| 90 | 84 |
| 91 } // namespace chromeos | 85 } // namespace chromeos |
| 92 | 86 |
| 93 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_IMAGE_VIEW_H_ | 87 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_IMAGE_VIEW_H_ |
| 94 | |
| OLD | NEW |