| 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 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 |