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 #ifndef CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_BUTTON_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_BUTTON_H_ |
6 #define CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_BUTTON_H_ | 6 #define CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_BUTTON_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 // -------------------------------- | 39 // -------------------------------- |
40 // Disable Wifi | 40 // Disable Wifi |
41 // Disable Celluar | 41 // Disable Celluar |
42 // -------------------------------- | 42 // -------------------------------- |
43 // <IP Address> | 43 // <IP Address> |
44 // Network settings... | 44 // Network settings... |
45 // | 45 // |
46 // <icon> will show the strength of the wifi/cellular networks. | 46 // <icon> will show the strength of the wifi/cellular networks. |
47 // The label will be BOLD if the network is currently connected. | 47 // The label will be BOLD if the network is currently connected. |
48 class NetworkMenuButton : public StatusAreaButton, | 48 class NetworkMenuButton : public StatusAreaButton, |
49 public views::MenuButtonDelegate, | 49 public views::MenuButtonListener, |
50 public NetworkMenu::Delegate, | 50 public NetworkMenu::Delegate, |
51 public NetworkMenuIcon::Delegate, | 51 public NetworkMenuIcon::Delegate, |
52 public NetworkLibrary::NetworkDeviceObserver, | 52 public NetworkLibrary::NetworkDeviceObserver, |
53 public NetworkLibrary::NetworkManagerObserver, | 53 public NetworkLibrary::NetworkManagerObserver, |
54 public NetworkLibrary::NetworkObserver, | 54 public NetworkLibrary::NetworkObserver, |
55 public NetworkLibrary::CellularDataPlanObserver, | 55 public NetworkLibrary::CellularDataPlanObserver, |
56 public views::Widget::Observer, | 56 public views::Widget::Observer, |
57 public MessageBubbleLinkListener { | 57 public MessageBubbleLinkListener { |
58 public: | 58 public: |
59 explicit NetworkMenuButton(StatusAreaButton::Delegate* delegate); | 59 explicit NetworkMenuButton(StatusAreaButton::Delegate* delegate); |
(...skipping 20 matching lines...) Expand all Loading... |
80 virtual gfx::NativeWindow GetNativeWindow() const OVERRIDE; | 80 virtual gfx::NativeWindow GetNativeWindow() const OVERRIDE; |
81 virtual void OpenButtonOptions() OVERRIDE; | 81 virtual void OpenButtonOptions() OVERRIDE; |
82 virtual bool ShouldOpenButtonOptions() const OVERRIDE; | 82 virtual bool ShouldOpenButtonOptions() const OVERRIDE; |
83 | 83 |
84 // NetworkMenuIcon::Delegate implementation: | 84 // NetworkMenuIcon::Delegate implementation: |
85 virtual void NetworkMenuIconChanged() OVERRIDE; | 85 virtual void NetworkMenuIconChanged() OVERRIDE; |
86 | 86 |
87 // views::View | 87 // views::View |
88 virtual void OnLocaleChanged() OVERRIDE; | 88 virtual void OnLocaleChanged() OVERRIDE; |
89 | 89 |
90 // views::MenuButtonDelegate implementation. | 90 // views::MenuButtonListener implementation. |
91 virtual void RunMenu(views::View* source, const gfx::Point& pt) OVERRIDE; | 91 virtual void OnMenuButtonClicked(views::View* source, |
| 92 const gfx::Point& point) OVERRIDE; |
92 | 93 |
93 // views::Widget::Observer implementation: | 94 // views::Widget::Observer implementation: |
94 virtual void OnWidgetClosing(views::Widget* widget) OVERRIDE; | 95 virtual void OnWidgetClosing(views::Widget* widget) OVERRIDE; |
95 | 96 |
96 // MessageBubbleLinkListener implementation: | 97 // MessageBubbleLinkListener implementation: |
97 virtual void OnLinkActivated(size_t index) OVERRIDE; | 98 virtual void OnLinkActivated(size_t index) OVERRIDE; |
98 | 99 |
99 private: | 100 private: |
100 // Returns carrier info. | 101 // Returns carrier info. |
101 const MobileConfig::Carrier* GetCarrier(NetworkLibrary* cros); | 102 const MobileConfig::Carrier* GetCarrier(NetworkLibrary* cros); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 | 154 |
154 // Factory for delaying showing promo notification. | 155 // Factory for delaying showing promo notification. |
155 base::WeakPtrFactory<NetworkMenuButton> weak_ptr_factory_; | 156 base::WeakPtrFactory<NetworkMenuButton> weak_ptr_factory_; |
156 | 157 |
157 DISALLOW_COPY_AND_ASSIGN(NetworkMenuButton); | 158 DISALLOW_COPY_AND_ASSIGN(NetworkMenuButton); |
158 }; | 159 }; |
159 | 160 |
160 } // namespace chromeos | 161 } // namespace chromeos |
161 | 162 |
162 #endif // CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_BUTTON_H_ | 163 #endif // CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_BUTTON_H_ |
OLD | NEW |