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

Side by Side Diff: ash/common/system/date/date_default_view.cc

Issue 2761373002: Move yet more from WmShell to Shell (Closed)
Patch Set: merge Created 3 years, 9 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
OLDNEW
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 #include "ash/common/system/date/date_default_view.h" 5 #include "ash/common/system/date/date_default_view.h"
6 6
7 #include "ash/common/metrics/user_metrics_action.h" 7 #include "ash/common/metrics/user_metrics_action.h"
8 #include "ash/common/session/session_controller.h" 8 #include "ash/common/session/session_controller.h"
9 #include "ash/common/shutdown_controller.h" 9 #include "ash/common/shutdown_controller.h"
10 #include "ash/common/system/date/date_view.h" 10 #include "ash/common/system/date/date_view.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 date_view_(nullptr) { 46 date_view_(nullptr) {
47 SetLayoutManager(new views::FillLayout); 47 SetLayoutManager(new views::FillLayout);
48 48
49 date_view_ = new tray::DateView(owner); 49 date_view_ = new tray::DateView(owner);
50 date_view_->SetBorder(views::CreateEmptyBorder( 50 date_view_->SetBorder(views::CreateEmptyBorder(
51 kPaddingVertical, ash::kTrayPopupPaddingHorizontal, 0, 0)); 51 kPaddingVertical, ash::kTrayPopupPaddingHorizontal, 0, 0));
52 SpecialPopupRow* view = new SpecialPopupRow(); 52 SpecialPopupRow* view = new SpecialPopupRow();
53 view->SetContent(date_view_); 53 view->SetContent(date_view_);
54 AddChildView(view); 54 AddChildView(view);
55 55
56 WmShell* shell = WmShell::Get(); 56 Shell* shell = Shell::Get();
57 const bool adding_user = 57 const bool adding_user =
58 shell->session_controller()->IsInSecondaryLoginScreen(); 58 shell->session_controller()->IsInSecondaryLoginScreen();
59 59
60 if (login == LoginStatus::LOCKED || login == LoginStatus::NOT_LOGGED_IN || 60 if (login == LoginStatus::LOCKED || login == LoginStatus::NOT_LOGGED_IN ||
61 adding_user) 61 adding_user)
62 return; 62 return;
63 63
64 date_view_->SetAction(tray::DateView::DateAction::SHOW_DATE_SETTINGS); 64 date_view_->SetAction(tray::DateView::DateAction::SHOW_DATE_SETTINGS);
65 65
66 help_button_ = new TrayPopupHeaderButton( 66 help_button_ = new TrayPopupHeaderButton(
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 chromeos::DBusThreadManager::Get() 137 chromeos::DBusThreadManager::Get()
138 ->GetSessionManagerClient() 138 ->GetSessionManagerClient()
139 ->RequestLockScreen(); 139 ->RequestLockScreen();
140 } else { 140 } else {
141 NOTREACHED(); 141 NOTREACHED();
142 } 142 }
143 date_view_->CloseSystemBubble(); 143 date_view_->CloseSystemBubble();
144 } 144 }
145 145
146 } // namespace ash 146 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/chromeos/settings/tray_settings.cc ('k') | ash/common/system/overview/overview_button_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698