| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/chromeos/status/network_menu_button.h" | 5 #include "chrome/browser/chromeos/status/network_menu_button.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 | 9 |
| 10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 | 89 |
| 90 void NetworkMenuButton::OnCellularDataPlanChanged(NetworkLibrary* cros) { | 90 void NetworkMenuButton::OnCellularDataPlanChanged(NetworkLibrary* cros) { |
| 91 // Call OnNetworkManagerChanged which will update the icon. | 91 // Call OnNetworkManagerChanged which will update the icon. |
| 92 OnNetworkManagerChanged(cros); | 92 OnNetworkManagerChanged(cros); |
| 93 } | 93 } |
| 94 | 94 |
| 95 //////////////////////////////////////////////////////////////////////////////// | 95 //////////////////////////////////////////////////////////////////////////////// |
| 96 // NetworkMenuButton, NetworkMenu implementation: | 96 // NetworkMenuButton, NetworkMenu implementation: |
| 97 | 97 |
| 98 bool NetworkMenuButton::IsBrowserMode() const { | 98 bool NetworkMenuButton::IsBrowserMode() const { |
| 99 return host_->IsBrowserMode(); | 99 return host_->GetScreenMode() == StatusAreaHost::kBrowserMode; |
| 100 } | 100 } |
| 101 | 101 |
| 102 gfx::NativeWindow NetworkMenuButton::GetNativeWindow() const { | 102 gfx::NativeWindow NetworkMenuButton::GetNativeWindow() const { |
| 103 return host_->GetNativeWindow(); | 103 return host_->GetNativeWindow(); |
| 104 } | 104 } |
| 105 | 105 |
| 106 void NetworkMenuButton::OpenButtonOptions() { | 106 void NetworkMenuButton::OpenButtonOptions() { |
| 107 host_->OpenButtonOptions(this); | 107 host_->OpenButtonOptions(this); |
| 108 } | 108 } |
| 109 | 109 |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 cros->RemoveNetworkObserver(active_network_, this); | 195 cros->RemoveNetworkObserver(active_network_, this); |
| 196 } | 196 } |
| 197 if (!new_network.empty()) { | 197 if (!new_network.empty()) { |
| 198 cros->AddNetworkObserver(new_network, this); | 198 cros->AddNetworkObserver(new_network, this); |
| 199 } | 199 } |
| 200 active_network_ = new_network; | 200 active_network_ = new_network; |
| 201 } | 201 } |
| 202 } | 202 } |
| 203 | 203 |
| 204 } // namespace chromeos | 204 } // namespace chromeos |
| OLD | NEW |