| OLD | NEW |
| 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/common/system/chromeos/palette/palette_tray.h" | 5 #include "ash/common/system/chromeos/palette/palette_tray.h" |
| 6 | 6 |
| 7 #include "ash/common/shelf/shelf_constants.h" | 7 #include "ash/common/shelf/shelf_constants.h" |
| 8 #include "ash/common/shelf/wm_shelf.h" | 8 #include "ash/common/shelf/wm_shelf.h" |
| 9 #include "ash/common/shelf/wm_shelf_util.h" | 9 #include "ash/common/shelf/wm_shelf_util.h" |
| 10 #include "ash/common/shell_window_ids.h" | 10 #include "ash/common/shell_window_ids.h" |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 | 217 |
| 218 host->AddChildView(view.view); | 218 host->AddChildView(view.view); |
| 219 } | 219 } |
| 220 } | 220 } |
| 221 | 221 |
| 222 void PaletteTray::SessionStateChanged( | 222 void PaletteTray::SessionStateChanged( |
| 223 SessionStateDelegate::SessionState state) { | 223 SessionStateDelegate::SessionState state) { |
| 224 UpdateIconVisibility(); | 224 UpdateIconVisibility(); |
| 225 } | 225 } |
| 226 | 226 |
| 227 void PaletteTray::OnLockStateChanged(bool locked) { |
| 228 UpdateIconVisibility(); |
| 229 } |
| 230 |
| 227 void PaletteTray::ClickedOutsideBubble() { | 231 void PaletteTray::ClickedOutsideBubble() { |
| 228 bubble_.reset(); | 232 bubble_.reset(); |
| 229 } | 233 } |
| 230 | 234 |
| 231 base::string16 PaletteTray::GetAccessibleNameForTray() { | 235 base::string16 PaletteTray::GetAccessibleNameForTray() { |
| 232 return l10n_util::GetStringUTF16(IDS_ASH_STYLUS_TOOLS_TITLE); | 236 return l10n_util::GetStringUTF16(IDS_ASH_STYLUS_TOOLS_TITLE); |
| 233 } | 237 } |
| 234 | 238 |
| 235 void PaletteTray::HideBubbleWithView(const views::TrayBubbleView* bubble_view) { | 239 void PaletteTray::HideBubbleWithView(const views::TrayBubbleView* bubble_view) { |
| 236 if (bubble_->bubble_view() == bubble_view) | 240 if (bubble_->bubble_view() == bubble_view) |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 WmShell::Get()->GetSessionStateDelegate(); | 356 WmShell::Get()->GetSessionStateDelegate(); |
| 353 | 357 |
| 354 SetVisible(!session_state_delegate->IsScreenLocked() && | 358 SetVisible(!session_state_delegate->IsScreenLocked() && |
| 355 session_state_delegate->GetSessionState() == | 359 session_state_delegate->GetSessionState() == |
| 356 SessionStateDelegate::SESSION_STATE_ACTIVE && | 360 SessionStateDelegate::SESSION_STATE_ACTIVE && |
| 357 WmShell::Get()->system_tray_delegate()->GetUserLoginStatus() != | 361 WmShell::Get()->system_tray_delegate()->GetUserLoginStatus() != |
| 358 LoginStatus::KIOSK_APP); | 362 LoginStatus::KIOSK_APP); |
| 359 } | 363 } |
| 360 | 364 |
| 361 } // namespace ash | 365 } // namespace ash |
| OLD | NEW |