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

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

Issue 6811025: Change status button menu implementation from Menu2 to MenuItemView. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixed crash in VPN submenu. Created 9 years, 8 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/logging.h" 10 #include "base/logging.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 OnNetworkManagerChanged(cros); 104 OnNetworkManagerChanged(cros);
105 } 105 }
106 106
107 //////////////////////////////////////////////////////////////////////////////// 107 ////////////////////////////////////////////////////////////////////////////////
108 // NetworkMenuButton, NetworkMenu implementation: 108 // NetworkMenuButton, NetworkMenu implementation:
109 109
110 bool NetworkMenuButton::IsBrowserMode() const { 110 bool NetworkMenuButton::IsBrowserMode() const {
111 return host_->GetScreenMode() == StatusAreaHost::kBrowserMode; 111 return host_->GetScreenMode() == StatusAreaHost::kBrowserMode;
112 } 112 }
113 113
114 views::MenuButton* NetworkMenuButton::GetMenuButton() {
115 return this;
116 }
117
114 gfx::NativeWindow NetworkMenuButton::GetNativeWindow() const { 118 gfx::NativeWindow NetworkMenuButton::GetNativeWindow() const {
115 return host_->GetNativeWindow(); 119 return host_->GetNativeWindow();
116 } 120 }
117 121
118 void NetworkMenuButton::OpenButtonOptions() { 122 void NetworkMenuButton::OpenButtonOptions() {
119 host_->OpenButtonOptions(this); 123 host_->OpenButtonOptions(this);
120 } 124 }
121 125
122 bool NetworkMenuButton::ShouldOpenButtonOptions() const { 126 bool NetworkMenuButton::ShouldOpenButtonOptions() const {
123 return host_->ShouldOpenButtonOptions(this); 127 return host_->ShouldOpenButtonOptions(this);
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 cros->RemoveNetworkObserver(active_network_, this); 250 cros->RemoveNetworkObserver(active_network_, this);
247 } 251 }
248 if (!new_network.empty()) { 252 if (!new_network.empty()) {
249 cros->AddNetworkObserver(new_network, this); 253 cros->AddNetworkObserver(new_network, this);
250 } 254 }
251 active_network_ = new_network; 255 active_network_ = new_network;
252 } 256 }
253 } 257 }
254 258
255 } // namespace chromeos 259 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698