| 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 #endif | 140 #endif |
| 141 } | 141 } |
| 142 | 142 |
| 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 return command_id == StatusAreaButton::Delegate::SHOW_NETWORK_OPTIONS; |
| 151 return true; | |
| 152 else | |
| 153 return false; | |
| 154 } else { | 151 } else { |
| 155 return true; | 152 return !chromeos::StatusAreaViewChromeos::IsScreenLockMode(); |
| 156 } | 153 } |
| 157 #else | 154 #else |
| 158 // TODO(stevenjb): system options for non-chromeos Aura? | 155 // TODO(stevenjb): system options for non-chromeos Aura? |
| 159 return false; | 156 return false; |
| 160 #endif | 157 #endif |
| 161 } | 158 } |
| 162 | 159 |
| 163 void StatusAreaHostAura::ExecuteStatusAreaCommand( | 160 void StatusAreaHostAura::ExecuteStatusAreaCommand( |
| 164 const views::View* button_view, int command_id) { | 161 const views::View* button_view, int command_id) { |
| 165 #if defined(OS_CHROMEOS) | 162 #if defined(OS_CHROMEOS) |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 } | 278 } |
| 282 | 279 |
| 283 void StatusAreaHostAura::UpdateAppearance() { | 280 void StatusAreaHostAura::UpdateAppearance() { |
| 284 status_area_view_->UpdateButtonTextStyle(); | 281 status_area_view_->UpdateButtonTextStyle(); |
| 285 | 282 |
| 286 gfx::Size offset = IsLoginOrLockScreenDisplayed() ? | 283 gfx::Size offset = IsLoginOrLockScreenDisplayed() ? |
| 287 GetCompactModeLoginAndLockOffset() : | 284 GetCompactModeLoginAndLockOffset() : |
| 288 GetCompactModeBrowserOffset(); | 285 GetCompactModeBrowserOffset(); |
| 289 ash::Shell::GetInstance()->SetCompactStatusAreaOffset(offset); | 286 ash::Shell::GetInstance()->SetCompactStatusAreaOffset(offset); |
| 290 } | 287 } |
| OLD | NEW |