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

Side by Side Diff: ash/system/tiles/tray_tiles.cc

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/tiles/tray_tiles.h ('k') | ash/system/tiles/tray_tiles_unittest.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 #include "ash/system/tiles/tray_tiles.h" 5 #include "ash/system/tiles/tray_tiles.h"
6 6
7 #include "ash/metrics/user_metrics_action.h" 7 #include "ash/metrics/user_metrics_action.h"
8 #include "ash/session/session_state_delegate.h"
9 #include "ash/system/tiles/tiles_default_view.h" 8 #include "ash/system/tiles/tiles_default_view.h"
10 9
11 namespace ash { 10 namespace ash {
12 11
13 TrayTiles::TrayTiles(SystemTray* system_tray) 12 TrayTiles::TrayTiles(SystemTray* system_tray)
14 : SystemTrayItem(system_tray, UMA_NOT_RECORDED), default_view_(nullptr) {} 13 : SystemTrayItem(system_tray, UMA_NOT_RECORDED), default_view_(nullptr) {}
15 14
16 TrayTiles::~TrayTiles() {} 15 TrayTiles::~TrayTiles() {}
17 16
18 views::View* TrayTiles::GetHelpButtonView() const { 17 views::View* TrayTiles::GetHelpButtonView() const {
19 if (!default_view_) 18 if (!default_view_)
20 return nullptr; 19 return nullptr;
21 return default_view_->GetHelpButtonView(); 20 return default_view_->GetHelpButtonView();
22 } 21 }
23 22
24 TilesDefaultView* TrayTiles::GetDefaultViewForTesting() const { 23 TilesDefaultView* TrayTiles::GetDefaultViewForTesting() const {
25 return default_view_; 24 return default_view_;
26 } 25 }
27 26
28 views::View* TrayTiles::CreateDefaultViewForTesting(LoginStatus status) { 27 views::View* TrayTiles::CreateDefaultViewForTesting() {
29 return CreateDefaultView(status); 28 // Login status is unused.
29 return CreateDefaultView(LoginStatus::USER);
30 } 30 }
31 31
32 views::View* TrayTiles::CreateDefaultView(LoginStatus status) { 32 views::View* TrayTiles::CreateDefaultView(LoginStatus status) {
33 CHECK(default_view_ == nullptr); 33 CHECK(default_view_ == nullptr);
34 default_view_ = new TilesDefaultView(this, status); 34 default_view_ = new TilesDefaultView(this);
35 default_view_->Init(); 35 default_view_->Init();
36 return default_view_; 36 return default_view_;
37 } 37 }
38 38
39 void TrayTiles::DestroyDefaultView() { 39 void TrayTiles::DestroyDefaultView() {
40 default_view_ = nullptr; 40 default_view_ = nullptr;
41 } 41 }
42 42
43 } // namespace ash 43 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tiles/tray_tiles.h ('k') | ash/system/tiles/tray_tiles_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698