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 #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 Loading... |
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 Loading... |
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 |
OLD | NEW |