Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(566)

Side by Side Diff: ash/system/tiles/tiles_default_view.h

Issue 2821363002: cros: Disable system tray help/lock buttons during supervised user creation (Closed)
Patch Set: fix browser test Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/system/ime_menu/ime_menu_tray.cc ('k') | ash/system/tiles/tiles_default_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_TILES_TILES_DEFAULT_VIEW_H_ 5 #ifndef ASH_SYSTEM_TILES_TILES_DEFAULT_VIEW_H_
6 #define ASH_SYSTEM_TILES_TILES_DEFAULT_VIEW_H_ 6 #define ASH_SYSTEM_TILES_TILES_DEFAULT_VIEW_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/login_status.h"
10 #include "base/macros.h" 9 #include "base/macros.h"
11 #include "ui/views/controls/button/button.h" 10 #include "ui/views/controls/button/button.h"
12 #include "ui/views/view.h" 11 #include "ui/views/view.h"
13 12
14 namespace views { 13 namespace views {
15 class CustomButton; 14 class CustomButton;
16 } 15 }
17 16
18 namespace ash { 17 namespace ash {
19 class SystemTrayItem; 18 class SystemTrayItem;
20 19
21 // The container view for the tiles in the bottom row of the system menu 20 // The container view for the tiles in the bottom row of the system menu
22 // (settings, help, lock, and power). 21 // (settings, help, lock, and power).
23 class ASH_EXPORT TilesDefaultView : public views::View, 22 class ASH_EXPORT TilesDefaultView : public views::View,
24 public views::ButtonListener { 23 public views::ButtonListener {
25 public: 24 public:
26 TilesDefaultView(SystemTrayItem* owner, LoginStatus login); 25 explicit TilesDefaultView(SystemTrayItem* owner);
27 ~TilesDefaultView() override; 26 ~TilesDefaultView() override;
28 27
29 // Sets the layout manager and child views of |this|. 28 // Sets the layout manager and child views of |this|.
30 // TODO(tdanderson|bruthig): Consider moving the layout manager 29 // TODO(tdanderson|bruthig): Consider moving the layout manager
31 // setup code to a location which can be shared by other system menu rows. 30 // setup code to a location which can be shared by other system menu rows.
32 void Init(); 31 void Init();
33 32
34 // views::ButtonListener: 33 // views::ButtonListener:
35 void ButtonPressed(views::Button* sender, const ui::Event& event) override; 34 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
36 35
37 // Accessor needed to obtain the help button view for the first-run flow. 36 // Accessor needed to obtain the help button view for the first-run flow.
38 views::View* GetHelpButtonView() const; 37 views::View* GetHelpButtonView() const;
39 38
40 const views::CustomButton* GetShutdownButtonViewForTest() const; 39 const views::CustomButton* GetShutdownButtonViewForTest() const;
41 40
42 private: 41 private:
43 friend class TrayTilesTest; 42 friend class TrayTilesTest;
44 43
45 SystemTrayItem* owner_; 44 SystemTrayItem* owner_;
46 LoginStatus login_;
47 45
48 // Pointers to the child buttons of |this|. Note that some buttons may not 46 // Pointers to the child buttons of |this|. Note that some buttons may not
49 // exist (depending on the user's current login status, for instance), in 47 // exist (depending on the user's current login status, for instance), in
50 // which case the corresponding pointer will be null. 48 // which case the corresponding pointer will be null.
51 views::CustomButton* settings_button_; 49 views::CustomButton* settings_button_;
52 views::CustomButton* help_button_; 50 views::CustomButton* help_button_;
53 views::CustomButton* lock_button_; 51 views::CustomButton* lock_button_;
54 views::CustomButton* power_button_; 52 views::CustomButton* power_button_;
55 53
56 DISALLOW_COPY_AND_ASSIGN(TilesDefaultView); 54 DISALLOW_COPY_AND_ASSIGN(TilesDefaultView);
57 }; 55 };
58 56
59 } // namespace ash 57 } // namespace ash
60 58
61 #endif // ASH_SYSTEM_TILES_TILES_DEFAULT_VIEW_H_ 59 #endif // ASH_SYSTEM_TILES_TILES_DEFAULT_VIEW_H_
OLDNEW
« no previous file with comments | « ash/system/ime_menu/ime_menu_tray.cc ('k') | ash/system/tiles/tiles_default_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698