| 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_SYSTEM_USER_USER_VIEW_H_ | 5 #ifndef ASH_SYSTEM_USER_USER_VIEW_H_ |
| 6 #define ASH_SYSTEM_USER_USER_VIEW_H_ | 6 #define ASH_SYSTEM_USER_USER_VIEW_H_ |
| 7 | 7 |
| 8 #include "ash/session/session_state_delegate.h" | 8 #include "ash/session/session_state_delegate.h" |
| 9 #include "ash/system/tray/tray_constants.h" | 9 #include "ash/system/tray/tray_constants.h" |
| 10 #include "ash/system/user/login_status.h" | 10 #include "ash/system/user/login_status.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 public views::MouseWatcherListener, | 38 public views::MouseWatcherListener, |
| 39 public views::FocusChangeListener { | 39 public views::FocusChangeListener { |
| 40 public: | 40 public: |
| 41 UserView(SystemTrayItem* owner, | 41 UserView(SystemTrayItem* owner, |
| 42 ash::user::LoginStatus login, | 42 ash::user::LoginStatus login, |
| 43 MultiProfileIndex index, | 43 MultiProfileIndex index, |
| 44 bool for_detailed_view); | 44 bool for_detailed_view); |
| 45 virtual ~UserView(); | 45 virtual ~UserView(); |
| 46 | 46 |
| 47 // Overridden from MouseWatcherListener: | 47 // Overridden from MouseWatcherListener: |
| 48 virtual void MouseMovedOutOfHost() OVERRIDE; | 48 virtual void MouseMovedOutOfHost() override; |
| 49 | 49 |
| 50 TrayUser::TestState GetStateForTest() const; | 50 TrayUser::TestState GetStateForTest() const; |
| 51 gfx::Rect GetBoundsInScreenOfUserButtonForTest(); | 51 gfx::Rect GetBoundsInScreenOfUserButtonForTest(); |
| 52 | 52 |
| 53 private: | 53 private: |
| 54 // Overridden from views::View. | 54 // Overridden from views::View. |
| 55 virtual gfx::Size GetPreferredSize() const OVERRIDE; | 55 virtual gfx::Size GetPreferredSize() const override; |
| 56 virtual int GetHeightForWidth(int width) const OVERRIDE; | 56 virtual int GetHeightForWidth(int width) const override; |
| 57 virtual void Layout() OVERRIDE; | 57 virtual void Layout() override; |
| 58 | 58 |
| 59 // Overridden from views::ButtonListener. | 59 // Overridden from views::ButtonListener. |
| 60 virtual void ButtonPressed(views::Button* sender, | 60 virtual void ButtonPressed(views::Button* sender, |
| 61 const ui::Event& event) OVERRIDE; | 61 const ui::Event& event) override; |
| 62 | 62 |
| 63 // Overridden from views::FocusChangeListener: | 63 // Overridden from views::FocusChangeListener: |
| 64 virtual void OnWillChangeFocus(View* focused_before, | 64 virtual void OnWillChangeFocus(View* focused_before, |
| 65 View* focused_now) OVERRIDE; | 65 View* focused_now) override; |
| 66 virtual void OnDidChangeFocus(View* focused_before, | 66 virtual void OnDidChangeFocus(View* focused_before, |
| 67 View* focused_now) OVERRIDE; | 67 View* focused_now) override; |
| 68 | 68 |
| 69 void AddLogoutButton(user::LoginStatus login); | 69 void AddLogoutButton(user::LoginStatus login); |
| 70 void AddUserCard(user::LoginStatus login); | 70 void AddUserCard(user::LoginStatus login); |
| 71 | 71 |
| 72 // Create the menu option to add another user. If |disabled| is set the user | 72 // Create the menu option to add another user. If |disabled| is set the user |
| 73 // cannot actively click on the item. | 73 // cannot actively click on the item. |
| 74 void ToggleAddUserMenuOption(); | 74 void ToggleAddUserMenuOption(); |
| 75 | 75 |
| 76 // Removes the add user menu option. | 76 // Removes the add user menu option. |
| 77 void RemoveAddUserMenuOption(); | 77 void RemoveAddUserMenuOption(); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 103 // The focus manager which we use to detect focus changes. | 103 // The focus manager which we use to detect focus changes. |
| 104 views::FocusManager* focus_manager_; | 104 views::FocusManager* focus_manager_; |
| 105 | 105 |
| 106 DISALLOW_COPY_AND_ASSIGN(UserView); | 106 DISALLOW_COPY_AND_ASSIGN(UserView); |
| 107 }; | 107 }; |
| 108 | 108 |
| 109 } // namespace tray | 109 } // namespace tray |
| 110 } // namespace ash | 110 } // namespace ash |
| 111 | 111 |
| 112 #endif // ASH_SYSTEM_USER_USER_VIEW_H_ | 112 #endif // ASH_SYSTEM_USER_USER_VIEW_H_ |
| OLD | NEW |