Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(311)

Side by Side Diff: chrome/browser/chromeos/status/network_menu_button.cc

Issue 6378008: Add GetScreenMode() to status_area_host.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review fix Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/status/input_method_menu_button.cc ('k') | chrome/browser/chromeos/status/status_area_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698