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

Side by Side Diff: ash/system/ime/tray_ime.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: 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/ime/tray_ime.h" 5 #include "ash/system/ime/tray_ime.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/root_window_controller.h" 9 #include "ash/root_window_controller.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 } 262 }
263 263
264 views::View* TrayIME::CreateTrayView(user::LoginStatus status) { 264 views::View* TrayIME::CreateTrayView(user::LoginStatus status) {
265 CHECK(tray_label_ == NULL); 265 CHECK(tray_label_ == NULL);
266 tray_label_ = new TrayItemView; 266 tray_label_ = new TrayItemView;
267 tray_label_->CreateLabel(); 267 tray_label_->CreateLabel();
268 SetupLabelForTray(tray_label_->label()); 268 SetupLabelForTray(tray_label_->label());
269 return tray_label_; 269 return tray_label_;
270 } 270 }
271 271
272 views::View* TrayIME::CreateDefaultView(user::LoginStatus status) { 272 views::View* TrayIME::CreateDefaultView(user::LoginStatus status,
273 int bubble_width) {
273 SystemTrayDelegate* delegate = Shell::GetInstance()->tray_delegate(); 274 SystemTrayDelegate* delegate = Shell::GetInstance()->tray_delegate();
274 IMEInfoList list; 275 IMEInfoList list;
275 IMEPropertyInfoList property_list; 276 IMEPropertyInfoList property_list;
276 delegate->GetAvailableIMEList(&list); 277 delegate->GetAvailableIMEList(&list);
277 delegate->GetCurrentIMEProperties(&property_list); 278 delegate->GetCurrentIMEProperties(&property_list);
278 if (list.size() <= 1 && property_list.size() <= 1) 279 if (list.size() <= 1 && property_list.size() <= 1)
279 return NULL; 280 return NULL;
280 CHECK(default_ == NULL); 281 CHECK(default_ == NULL);
281 default_ = new tray::IMEDefaultView(this); 282 default_ = new tray::IMEDefaultView(this);
282 return default_; 283 return default_;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 } else if (!Shell::GetPrimaryRootWindowController()->shelf()->IsVisible() || 343 } else if (!Shell::GetPrimaryRootWindowController()->shelf()->IsVisible() ||
343 !message_shown_) { 344 !message_shown_) {
344 ShowNotificationView(); 345 ShowNotificationView();
345 message_shown_ = true; 346 message_shown_ = true;
346 } 347 }
347 } 348 }
348 } 349 }
349 350
350 } // namespace internal 351 } // namespace internal
351 } // namespace ash 352 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698