| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 ASH_COMMON_SYSTEM_USER_USER_VIEW_H_ | 5 #ifndef ASH_COMMON_SYSTEM_USER_USER_VIEW_H_ |
| 6 #define ASH_COMMON_SYSTEM_USER_USER_VIEW_H_ | 6 #define ASH_COMMON_SYSTEM_USER_USER_VIEW_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "ash/common/system/tray/tray_constants.h" | 10 #include "ash/common/system/tray/tray_constants.h" |
| 11 #include "ash/common/system/user/tray_user.h" | 11 #include "ash/common/system/user/tray_user.h" |
| 12 #include "ash/public/cpp/session_types.h" | 12 #include "ash/public/cpp/session_types.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "ui/views/controls/button/button.h" | 14 #include "ui/views/controls/button/button.h" |
| 15 #include "ui/views/focus/focus_manager.h" | 15 #include "ui/views/focus/focus_manager.h" |
| 16 #include "ui/views/layout/box_layout.h" | 16 #include "ui/views/layout/box_layout.h" |
| 17 #include "ui/views/view.h" | 17 #include "ui/views/view.h" |
| 18 | 18 |
| 19 namespace gfx { | 19 namespace gfx { |
| 20 class Rect; | 20 class Rect; |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace views { | 23 namespace views { |
| 24 class FocusManager; | 24 class FocusManager; |
| 25 } | 25 } |
| 26 | 26 |
| 27 namespace ash { | 27 namespace ash { |
| 28 | 28 |
| 29 enum class LoginStatus; | 29 enum class LoginStatus; |
| 30 class PopupMessage; | |
| 31 class SystemTrayItem; | 30 class SystemTrayItem; |
| 32 | 31 |
| 33 namespace tray { | 32 namespace tray { |
| 34 | 33 |
| 35 // The view of a user item in system tray bubble. | 34 // The view of a user item in system tray bubble. |
| 36 class UserView : public views::View, | 35 class UserView : public views::View, |
| 37 public views::ButtonListener, | 36 public views::ButtonListener, |
| 38 public views::FocusChangeListener { | 37 public views::FocusChangeListener { |
| 39 public: | 38 public: |
| 40 UserView(SystemTrayItem* owner, LoginStatus login, UserIndex index); | 39 UserView(SystemTrayItem* owner, LoginStatus login, UserIndex index); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 views::View* user_card_view_; | 72 views::View* user_card_view_; |
| 74 | 73 |
| 75 // This is the owner system tray item of this view. | 74 // This is the owner system tray item of this view. |
| 76 SystemTrayItem* owner_; | 75 SystemTrayItem* owner_; |
| 77 | 76 |
| 78 // True if |user_card_view_| is a |ButtonFromView| - otherwise it is only | 77 // True if |user_card_view_| is a |ButtonFromView| - otherwise it is only |
| 79 // a |UserCardView|. | 78 // a |UserCardView|. |
| 80 bool is_user_card_button_; | 79 bool is_user_card_button_; |
| 81 | 80 |
| 82 views::View* logout_button_; | 81 views::View* logout_button_; |
| 83 std::unique_ptr<PopupMessage> popup_message_; | |
| 84 std::unique_ptr<views::Widget> add_menu_option_; | 82 std::unique_ptr<views::Widget> add_menu_option_; |
| 85 | 83 |
| 86 // False when the add user panel is visible but not activatable. | 84 // False when the add user panel is visible but not activatable. |
| 87 bool add_user_enabled_; | 85 bool add_user_enabled_; |
| 88 | 86 |
| 89 // The focus manager which we use to detect focus changes. | 87 // The focus manager which we use to detect focus changes. |
| 90 views::FocusManager* focus_manager_; | 88 views::FocusManager* focus_manager_; |
| 91 | 89 |
| 92 DISALLOW_COPY_AND_ASSIGN(UserView); | 90 DISALLOW_COPY_AND_ASSIGN(UserView); |
| 93 }; | 91 }; |
| 94 | 92 |
| 95 } // namespace tray | 93 } // namespace tray |
| 96 } // namespace ash | 94 } // namespace ash |
| 97 | 95 |
| 98 #endif // ASH_COMMON_SYSTEM_USER_USER_VIEW_H_ | 96 #endif // ASH_COMMON_SYSTEM_USER_USER_VIEW_H_ |
| OLD | NEW |