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 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 return this; | 196 return this; |
197 } | 197 } |
198 | 198 |
199 gfx::NativeWindow NetworkMenuButton::GetNativeWindow() const { | 199 gfx::NativeWindow NetworkMenuButton::GetNativeWindow() const { |
200 // This must always have a parent, which must have a widget ancestor. | 200 // This must always have a parent, which must have a widget ancestor. |
201 return parent()->GetWidget()->GetNativeWindow(); | 201 return parent()->GetWidget()->GetNativeWindow(); |
202 } | 202 } |
203 | 203 |
204 void NetworkMenuButton::OpenButtonOptions() { | 204 void NetworkMenuButton::OpenButtonOptions() { |
205 delegate()->ExecuteStatusAreaCommand( | 205 delegate()->ExecuteStatusAreaCommand( |
206 this, StatusAreaViewChromeos::SHOW_NETWORK_OPTIONS); | 206 this, StatusAreaButton::Delegate::SHOW_NETWORK_OPTIONS); |
207 } | 207 } |
208 | 208 |
209 bool NetworkMenuButton::ShouldOpenButtonOptions() const { | 209 bool NetworkMenuButton::ShouldOpenButtonOptions() const { |
210 return delegate()->ShouldExecuteStatusAreaCommand( | 210 return delegate()->ShouldExecuteStatusAreaCommand( |
211 this, StatusAreaViewChromeos::SHOW_NETWORK_OPTIONS); | 211 this, StatusAreaButton::Delegate::SHOW_NETWORK_OPTIONS); |
212 } | 212 } |
213 | 213 |
214 //////////////////////////////////////////////////////////////////////////////// | 214 //////////////////////////////////////////////////////////////////////////////// |
215 // NetworkMenuButton, views::View implementation: | 215 // NetworkMenuButton, views::View implementation: |
216 | 216 |
217 void NetworkMenuButton::OnLocaleChanged() { | 217 void NetworkMenuButton::OnLocaleChanged() { |
218 SetNetworkIcon(); | 218 SetNetworkIcon(); |
219 network_menu_->UpdateMenu(); | 219 network_menu_->UpdateMenu(); |
220 } | 220 } |
221 | 221 |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 SetCarrierDealPromoShown(carrier_deal_promo_pref + 1); | 442 SetCarrierDealPromoShown(carrier_deal_promo_pref + 1); |
443 } | 443 } |
444 } | 444 } |
445 | 445 |
446 void NetworkMenuButton::SetTooltipAndAccessibleName(const string16& label) { | 446 void NetworkMenuButton::SetTooltipAndAccessibleName(const string16& label) { |
447 SetTooltipText(label); | 447 SetTooltipText(label); |
448 SetAccessibleName(label); | 448 SetAccessibleName(label); |
449 } | 449 } |
450 | 450 |
451 } // namespace chromeos | 451 } // namespace chromeos |
OLD | NEW |