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

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

Issue 7016042: Convert NetworkMenu from Menu2 to MenuItemView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tweak menu vertical spacing. Created 9 years, 7 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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 OnNetworkManagerChanged(cros); 189 OnNetworkManagerChanged(cros);
190 } 190 }
191 191
192 //////////////////////////////////////////////////////////////////////////////// 192 ////////////////////////////////////////////////////////////////////////////////
193 // NetworkMenuButton, NetworkMenu implementation: 193 // NetworkMenuButton, NetworkMenu implementation:
194 194
195 bool NetworkMenuButton::IsBrowserMode() const { 195 bool NetworkMenuButton::IsBrowserMode() const {
196 return host_->GetScreenMode() == StatusAreaHost::kBrowserMode; 196 return host_->GetScreenMode() == StatusAreaHost::kBrowserMode;
197 } 197 }
198 198
199 views::MenuButton* NetworkMenuButton::GetMenuButton() {
200 return this;
201 }
202
199 gfx::NativeWindow NetworkMenuButton::GetNativeWindow() const { 203 gfx::NativeWindow NetworkMenuButton::GetNativeWindow() const {
200 return host_->GetNativeWindow(); 204 return host_->GetNativeWindow();
201 } 205 }
202 206
203 void NetworkMenuButton::OpenButtonOptions() { 207 void NetworkMenuButton::OpenButtonOptions() {
204 host_->OpenButtonOptions(this); 208 host_->OpenButtonOptions(this);
205 } 209 }
206 210
207 bool NetworkMenuButton::ShouldOpenButtonOptions() const { 211 bool NetworkMenuButton::ShouldOpenButtonOptions() const {
208 return host_->ShouldOpenButtonOptions(this); 212 return host_->ShouldOpenButtonOptions(this);
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 this); 494 this);
491 495
492 check_for_promo_ = false; 496 check_for_promo_ = false;
493 SetShow3gPromoNotification(false); 497 SetShow3gPromoNotification(false);
494 if (carrier_deal_promo_pref != kNotificationCountPrefDefault) 498 if (carrier_deal_promo_pref != kNotificationCountPrefDefault)
495 SetCarrierDealPromoShown(carrier_deal_promo_pref + 1); 499 SetCarrierDealPromoShown(carrier_deal_promo_pref + 1);
496 } 500 }
497 } 501 }
498 502
499 } // namespace chromeos 503 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698