| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/tray_caps_lock.h" | 5 #include "ash/system/tray_caps_lock.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/system/tray/system_tray_delegate.h" | 8 #include "ash/system/tray/system_tray_delegate.h" |
| 9 #include "ash/system/tray/tray_constants.h" | 9 #include "ash/system/tray/tray_constants.h" |
| 10 #include "grit/ui_resources.h" | 10 #include "grit/ui_resources.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 | 48 |
| 49 return detailed_.get(); | 49 return detailed_.get(); |
| 50 } | 50 } |
| 51 | 51 |
| 52 void TrayCapsLock::DestroyDetailedView() { | 52 void TrayCapsLock::DestroyDetailedView() { |
| 53 detailed_.reset(); | 53 detailed_.reset(); |
| 54 } | 54 } |
| 55 | 55 |
| 56 void TrayCapsLock::OnCapsLockChanged(bool enabled, | 56 void TrayCapsLock::OnCapsLockChanged(bool enabled, |
| 57 int string_id) { | 57 int string_id) { |
| 58 if (image_view()) | 58 if (tray_view()) |
| 59 image_view()->SetVisible(enabled); | 59 tray_view()->SetVisible(enabled); |
| 60 | 60 |
| 61 if (enabled) { | 61 if (enabled) { |
| 62 string_id_ = string_id; | 62 string_id_ = string_id; |
| 63 PopupDetailedView(kTrayPopupAutoCloseDelayForTextInSeconds, false); | 63 PopupDetailedView(kTrayPopupAutoCloseDelayForTextInSeconds, false); |
| 64 } else if (detailed_.get()) { | 64 } else if (detailed_.get()) { |
| 65 string_id_ = 0; | 65 string_id_ = 0; |
| 66 detailed_->GetWidget()->Close(); | 66 detailed_->GetWidget()->Close(); |
| 67 } | 67 } |
| 68 } | 68 } |
| 69 | 69 |
| 70 } // namespace internal | 70 } // namespace internal |
| 71 } // namespace ash | 71 } // namespace ash |
| OLD | NEW |