OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 | 218 |
219 //////////////////////////////////////////////////////////////////////////////// | 219 //////////////////////////////////////////////////////////////////////////////// |
220 // NetworkMenuButton, views::View implementation: | 220 // NetworkMenuButton, views::View implementation: |
221 | 221 |
222 void NetworkMenuButton::OnLocaleChanged() { | 222 void NetworkMenuButton::OnLocaleChanged() { |
223 SetNetworkIcon(); | 223 SetNetworkIcon(); |
224 network_menu_->UpdateMenu(); | 224 network_menu_->UpdateMenu(); |
225 } | 225 } |
226 | 226 |
227 //////////////////////////////////////////////////////////////////////////////// | 227 //////////////////////////////////////////////////////////////////////////////// |
228 // NetworkMenuButton, views::MenuButtonDelegate implementation: | 228 // NetworkMenuButton, views::MenuButtonListener implementation: |
229 void NetworkMenuButton::RunMenu(views::View* source, const gfx::Point& pt) { | 229 void NetworkMenuButton::OnMenuButtonClicked(views::View* source, |
| 230 const gfx::Point& point) { |
230 network_menu_->RunMenu(source); | 231 network_menu_->RunMenu(source); |
231 } | 232 } |
232 | 233 |
233 //////////////////////////////////////////////////////////////////////////////// | 234 //////////////////////////////////////////////////////////////////////////////// |
234 // NetworkMenuButton, NetworkMenuIcon::Delegate implementation: | 235 // NetworkMenuButton, NetworkMenuIcon::Delegate implementation: |
235 void NetworkMenuButton::NetworkMenuIconChanged() { | 236 void NetworkMenuButton::NetworkMenuIconChanged() { |
236 const SkBitmap bitmap = network_icon_->GetIconAndText(NULL); | 237 const SkBitmap bitmap = network_icon_->GetIconAndText(NULL); |
237 SetIcon(bitmap); | 238 SetIcon(bitmap); |
238 SchedulePaint(); | 239 SchedulePaint(); |
239 } | 240 } |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 SetCarrierDealPromoShown(carrier_deal_promo_pref + 1); | 441 SetCarrierDealPromoShown(carrier_deal_promo_pref + 1); |
441 } | 442 } |
442 } | 443 } |
443 | 444 |
444 void NetworkMenuButton::SetTooltipAndAccessibleName(const string16& label) { | 445 void NetworkMenuButton::SetTooltipAndAccessibleName(const string16& label) { |
445 SetTooltipText(label); | 446 SetTooltipText(label); |
446 SetAccessibleName(label); | 447 SetAccessibleName(label); |
447 } | 448 } |
448 | 449 |
449 } // namespace chromeos | 450 } // namespace chromeos |
OLD | NEW |