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

Side by Side Diff: ash/system/drive/tray_drive.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/drive/tray_drive.h" 5 #include "ash/system/drive/tray_drive.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/system/tray/system_tray.h" 10 #include "ash/system/tray/system_tray.h"
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 } 381 }
382 382
383 TrayDrive::~TrayDrive() { 383 TrayDrive::~TrayDrive() {
384 } 384 }
385 385
386 bool TrayDrive::GetInitialVisibility() { 386 bool TrayDrive::GetInitialVisibility() {
387 scoped_ptr<DriveOperationStatusList> list(GetCurrentOperationList()); 387 scoped_ptr<DriveOperationStatusList> list(GetCurrentOperationList());
388 return list->size() > 0; 388 return list->size() > 0;
389 } 389 }
390 390
391 views::View* TrayDrive::CreateDefaultView(user::LoginStatus status) { 391 views::View* TrayDrive::CreateDefaultView(user::LoginStatus status,
392 int bubble_width) {
392 DCHECK(!default_); 393 DCHECK(!default_);
393 394
394 if (status != user::LOGGED_IN_USER && status != user::LOGGED_IN_OWNER) 395 if (status != user::LOGGED_IN_USER && status != user::LOGGED_IN_OWNER)
395 return NULL; 396 return NULL;
396 397
397 scoped_ptr<DriveOperationStatusList> list(GetCurrentOperationList()); 398 scoped_ptr<DriveOperationStatusList> list(GetCurrentOperationList());
398 if (!list->size()) 399 if (!list->size())
399 return NULL; 400 return NULL;
400 401
401 default_ = new tray::DriveDefaultView(this, list.get()); 402 default_ = new tray::DriveDefaultView(this, list.get());
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 440
440 if (default_) 441 if (default_)
441 default_->Update(&list); 442 default_->Update(&list);
442 443
443 if (detailed_) 444 if (detailed_)
444 detailed_->Update(&list); 445 detailed_->Update(&list);
445 } 446 }
446 447
447 } // namespace internal 448 } // namespace internal
448 } // namespace ash 449 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698