OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |