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

Side by Side Diff: ash/system/chromeos/tray_display.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/chromeos/tray_display.h" 5 #include "ash/system/chromeos/tray_display.h"
6 6
7 #include "ash/display/display_controller.h" 7 #include "ash/display/display_controller.h"
8 #include "ash/display/display_manager.h" 8 #include "ash/display/display_manager.h"
9 #include "ash/screen_ash.h" 9 #include "ash/screen_ash.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 : default_(NULL) { 118 : default_(NULL) {
119 Shell::GetScreen()->AddObserver(this); 119 Shell::GetScreen()->AddObserver(this);
120 Shell::GetInstance()->output_configurator()->AddObserver(this); 120 Shell::GetInstance()->output_configurator()->AddObserver(this);
121 } 121 }
122 122
123 TrayDisplay::~TrayDisplay() { 123 TrayDisplay::~TrayDisplay() {
124 Shell::GetScreen()->RemoveObserver(this); 124 Shell::GetScreen()->RemoveObserver(this);
125 Shell::GetInstance()->output_configurator()->RemoveObserver(this); 125 Shell::GetInstance()->output_configurator()->RemoveObserver(this);
126 } 126 }
127 127
128 views::View* TrayDisplay::CreateDefaultView(user::LoginStatus status) { 128 views::View* TrayDisplay::CreateDefaultView(user::LoginStatus status,
129 int bubble_width) {
129 default_ = new DisplayView(status); 130 default_ = new DisplayView(status);
130 return default_; 131 return default_;
131 } 132 }
132 133
133 void TrayDisplay::DestroyDefaultView() { 134 void TrayDisplay::DestroyDefaultView() {
134 default_ = NULL; 135 default_ = NULL;
135 } 136 }
136 137
137 void TrayDisplay::OnDisplayBoundsChanged(const gfx::Display& display) { 138 void TrayDisplay::OnDisplayBoundsChanged(const gfx::Display& display) {
138 if (default_) 139 if (default_)
(...skipping 10 matching lines...) Expand all
149 default_->Update(); 150 default_->Update();
150 } 151 }
151 152
152 void TrayDisplay::OnDisplayModeChanged() { 153 void TrayDisplay::OnDisplayModeChanged() {
153 if (default_) 154 if (default_)
154 default_->Update(); 155 default_->Update();
155 } 156 }
156 157
157 } // namespace internal 158 } // namespace internal
158 } // namespace ash 159 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698