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/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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 | 107 |
108 return true; | 108 return true; |
109 } | 109 } |
110 | 110 |
111 user::LoginStatus login_status_; | 111 user::LoginStatus login_status_; |
112 views::Label* label_; | 112 views::Label* label_; |
113 | 113 |
114 DISALLOW_COPY_AND_ASSIGN(DisplayView); | 114 DISALLOW_COPY_AND_ASSIGN(DisplayView); |
115 }; | 115 }; |
116 | 116 |
117 TrayDisplay::TrayDisplay() | 117 TrayDisplay::TrayDisplay(SystemTray* system_tray) |
118 : default_(NULL) { | 118 : SystemTrayItem(system_tray), |
| 119 default_(NULL) { |
119 Shell::GetScreen()->AddObserver(this); | 120 Shell::GetScreen()->AddObserver(this); |
120 Shell::GetInstance()->output_configurator()->AddObserver(this); | 121 Shell::GetInstance()->output_configurator()->AddObserver(this); |
121 } | 122 } |
122 | 123 |
123 TrayDisplay::~TrayDisplay() { | 124 TrayDisplay::~TrayDisplay() { |
124 Shell::GetScreen()->RemoveObserver(this); | 125 Shell::GetScreen()->RemoveObserver(this); |
125 Shell::GetInstance()->output_configurator()->RemoveObserver(this); | 126 Shell::GetInstance()->output_configurator()->RemoveObserver(this); |
126 } | 127 } |
127 | 128 |
128 views::View* TrayDisplay::CreateDefaultView(user::LoginStatus status) { | 129 views::View* TrayDisplay::CreateDefaultView(user::LoginStatus status) { |
(...skipping 20 matching lines...) Expand all Loading... |
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 |
OLD | NEW |