OLD | NEW |
1 // Copyright (c) 2006-2008 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 #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 |
11 #include "base/timer.h" | 11 #include "base/timer.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 // NetworkLibrary::NetworkManagerObserver implementation. | 61 // NetworkLibrary::NetworkManagerObserver implementation. |
62 virtual void OnNetworkManagerChanged(NetworkLibrary* cros); | 62 virtual void OnNetworkManagerChanged(NetworkLibrary* cros); |
63 // NetworkLibrary::NetworkObserver implementation. | 63 // NetworkLibrary::NetworkObserver implementation. |
64 virtual void OnNetworkChanged(NetworkLibrary* cros, const Network* network); | 64 virtual void OnNetworkChanged(NetworkLibrary* cros, const Network* network); |
65 // NetworkLibrary::CellularDataPlanObserver implementation. | 65 // NetworkLibrary::CellularDataPlanObserver implementation. |
66 virtual void OnCellularDataPlanChanged(NetworkLibrary* cros); | 66 virtual void OnCellularDataPlanChanged(NetworkLibrary* cros); |
67 | 67 |
68 protected: | 68 protected: |
69 // NetworkMenu implementation: | 69 // NetworkMenu implementation: |
70 virtual bool IsBrowserMode() const; | 70 virtual bool IsBrowserMode() const; |
| 71 virtual views::MenuButton* GetMenuButton() { return this; } |
71 virtual gfx::NativeWindow GetNativeWindow() const; | 72 virtual gfx::NativeWindow GetNativeWindow() const; |
72 virtual void OpenButtonOptions(); | 73 virtual void OpenButtonOptions(); |
73 virtual bool ShouldOpenButtonOptions() const; | 74 virtual bool ShouldOpenButtonOptions() const; |
74 | 75 |
75 private: | 76 private: |
76 // Sets the icon and the badge. | 77 // Sets the icon and the badge. |
77 void SetIconAndBadge(const SkBitmap* icon, const SkBitmap* badge); | 78 void SetIconAndBadge(const SkBitmap* icon, const SkBitmap* badge); |
78 // Sets the icon only. Keep the previous badge. | 79 // Sets the icon only. Keep the previous badge. |
79 void SetIconOnly(const SkBitmap* icon); | 80 void SetIconOnly(const SkBitmap* icon); |
80 // Sets the badge only. Keep the previous icon. | 81 // Sets the badge only. Keep the previous icon. |
(...skipping 22 matching lines...) Expand all Loading... |
103 // If any network is currently active, this is the service path of the one | 104 // If any network is currently active, this is the service path of the one |
104 // whose status is displayed in the network menu button. | 105 // whose status is displayed in the network menu button. |
105 std::string active_network_; | 106 std::string active_network_; |
106 | 107 |
107 DISALLOW_COPY_AND_ASSIGN(NetworkMenuButton); | 108 DISALLOW_COPY_AND_ASSIGN(NetworkMenuButton); |
108 }; | 109 }; |
109 | 110 |
110 } // namespace chromeos | 111 } // namespace chromeos |
111 | 112 |
112 #endif // CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_BUTTON_H_ | 113 #endif // CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_BUTTON_H_ |
OLD | NEW |