| 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 #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 50 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 private: | 68 private: |
| 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 // views::View | 76 // views::View |
| 76 virtual void OnLocaleChanged() OVERRIDE; | 77 virtual void OnLocaleChanged() OVERRIDE; |
| 77 | 78 |
| 78 // Sets the icon and the badge. | 79 // Sets the icon and the badge. |
| 79 void SetIconAndBadge(const SkBitmap* icon, const SkBitmap* badge); | 80 void SetIconAndBadge(const SkBitmap* icon, const SkBitmap* badge); |
| 80 // Sets the icon only. Keep the previous badge. | 81 // Sets the icon only. Keep the previous badge. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 105 // If any network is currently active, this is the service path of the one | 106 // If any network is currently active, this is the service path of the one |
| 106 // whose status is displayed in the network menu button. | 107 // whose status is displayed in the network menu button. |
| 107 std::string active_network_; | 108 std::string active_network_; |
| 108 | 109 |
| 109 DISALLOW_COPY_AND_ASSIGN(NetworkMenuButton); | 110 DISALLOW_COPY_AND_ASSIGN(NetworkMenuButton); |
| 110 }; | 111 }; |
| 111 | 112 |
| 112 } // namespace chromeos | 113 } // namespace chromeos |
| 113 | 114 |
| 114 #endif // CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_BUTTON_H_ | 115 #endif // CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_BUTTON_H_ |
| OLD | NEW |