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 "chrome/browser/ui/views/aura/status_area_host_aura.h" | 5 #include "chrome/browser/ui/views/aura/status_area_host_aura.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/shell_window_ids.h" | 8 #include "ash/shell_window_ids.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "chrome/browser/chromeos/status/clock_menu_button.h" | 10 #include "chrome/browser/chromeos/status/clock_menu_button.h" |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
143 // StatusAreaButton::Delegate implementation. | 143 // StatusAreaButton::Delegate implementation. |
144 | 144 |
145 bool StatusAreaHostAura::ShouldExecuteStatusAreaCommand( | 145 bool StatusAreaHostAura::ShouldExecuteStatusAreaCommand( |
146 const views::View* button_view, int command_id) const { | 146 const views::View* button_view, int command_id) const { |
147 #if defined(OS_CHROMEOS) | 147 #if defined(OS_CHROMEOS) |
148 if (chromeos::StatusAreaViewChromeos::IsLoginMode()) { | 148 if (chromeos::StatusAreaViewChromeos::IsLoginMode()) { |
149 // In login mode network options command means proxy settings dialog. | 149 // In login mode network options command means proxy settings dialog. |
150 if (command_id == StatusAreaButton::Delegate::SHOW_NETWORK_OPTIONS) | 150 if (command_id == StatusAreaButton::Delegate::SHOW_NETWORK_OPTIONS) |
151 return true; | 151 return true; |
152 else | 152 else |
153 return false; | 153 return false; |
oshima
2012/02/29 15:44:22
this can also be
return command_id == StatusAreaBu
Yusuke Sato
2012/03/01 06:27:53
Done.
| |
154 } else if (chromeos::StatusAreaViewChromeos::IsScreenLockMode()) { | |
155 return false; | |
154 } else { | 156 } else { |
155 return true; | 157 return true; |
oshima
2012/02/29 15:44:22
how about just:
} else {
return !chromeos::Sta
Yusuke Sato
2012/03/01 06:27:53
Done.
| |
156 } | 158 } |
157 #else | 159 #else |
158 // TODO(stevenjb): system options for non-chromeos Aura? | 160 // TODO(stevenjb): system options for non-chromeos Aura? |
159 return false; | 161 return false; |
160 #endif | 162 #endif |
161 } | 163 } |
162 | 164 |
163 void StatusAreaHostAura::ExecuteStatusAreaCommand( | 165 void StatusAreaHostAura::ExecuteStatusAreaCommand( |
164 const views::View* button_view, int command_id) { | 166 const views::View* button_view, int command_id) { |
165 #if defined(OS_CHROMEOS) | 167 #if defined(OS_CHROMEOS) |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
281 } | 283 } |
282 | 284 |
283 void StatusAreaHostAura::UpdateAppearance() { | 285 void StatusAreaHostAura::UpdateAppearance() { |
284 status_area_view_->UpdateButtonTextStyle(); | 286 status_area_view_->UpdateButtonTextStyle(); |
285 | 287 |
286 gfx::Size offset = IsLoginOrLockScreenDisplayed() ? | 288 gfx::Size offset = IsLoginOrLockScreenDisplayed() ? |
287 GetCompactModeLoginAndLockOffset() : | 289 GetCompactModeLoginAndLockOffset() : |
288 GetCompactModeBrowserOffset(); | 290 GetCompactModeBrowserOffset(); |
289 ash::Shell::GetInstance()->SetCompactStatusAreaOffset(offset); | 291 ash::Shell::GetInstance()->SetCompactStatusAreaOffset(offset); |
290 } | 292 } |
OLD | NEW |