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

Side by Side Diff: ash/system/tray_caps_lock.cc

Issue 11415014: Stop using shell::GetInstance()->system_tray() in system tray items (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed unnecessary forward declarations. Renamed |tray| to |owner|. Created 8 years, 1 month 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 | Annotate | Revision Log
OLDNEW
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/caps_lock_delegate.h" 7 #include "ash/caps_lock_delegate.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/system/tray/tray_constants.h" 9 #include "ash/system/tray/tray_constants.h"
10 #include "ash/system/tray/tray_views.h" 10 #include "ash/system/tray/tray_views.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 Shell::GetInstance()->caps_lock_delegate()->ToggleCapsLock(); 95 Shell::GetInstance()->caps_lock_delegate()->ToggleCapsLock();
96 return true; 96 return true;
97 } 97 }
98 98
99 views::Label* text_label_; 99 views::Label* text_label_;
100 views::Label* shortcut_label_; 100 views::Label* shortcut_label_;
101 101
102 DISALLOW_COPY_AND_ASSIGN(CapsLockDefaultView); 102 DISALLOW_COPY_AND_ASSIGN(CapsLockDefaultView);
103 }; 103 };
104 104
105 TrayCapsLock::TrayCapsLock() 105 TrayCapsLock::TrayCapsLock(SystemTray* system_tray)
106 : TrayImageItem(IDR_AURA_UBER_TRAY_CAPS_LOCK), 106 : TrayImageItem(system_tray, IDR_AURA_UBER_TRAY_CAPS_LOCK),
107 default_(NULL), 107 default_(NULL),
108 detailed_(NULL), 108 detailed_(NULL),
109 search_mapped_to_caps_lock_(false), 109 search_mapped_to_caps_lock_(false),
110 caps_lock_enabled_( 110 caps_lock_enabled_(
111 Shell::GetInstance()->caps_lock_delegate()->IsCapsLockEnabled()), 111 Shell::GetInstance()->caps_lock_delegate()->IsCapsLockEnabled()),
112 message_shown_(false) { 112 message_shown_(false) {
113 } 113 }
114 114
115 TrayCapsLock::~TrayCapsLock() {} 115 TrayCapsLock::~TrayCapsLock() {}
116 116
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 message_shown_ = true; 178 message_shown_ = true;
179 } 179 }
180 } else if (detailed_) { 180 } else if (detailed_) {
181 detailed_->GetWidget()->Close(); 181 detailed_->GetWidget()->Close();
182 } 182 }
183 } 183 }
184 } 184 }
185 185
186 } // namespace internal 186 } // namespace internal
187 } // namespace ash 187 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698