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_UI_WEBUI_CHROMEOS_LOGIN_NETWORK_DROPDOWN_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_NETWORK_DROPDOWN_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_NETWORK_DROPDOWN_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_NETWORK_DROPDOWN_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/timer.h" | 9 #include "base/timer.h" |
10 #include "chrome/browser/chromeos/cros/network_library.h" | 10 #include "chrome/browser/chromeos/cros/network_library.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 class NetworkMenuWebUI; | 21 class NetworkMenuWebUI; |
22 | 22 |
23 // Class which implements network dropdown menu using WebUI. | 23 // Class which implements network dropdown menu using WebUI. |
24 class NetworkDropdown : public NetworkMenu::Delegate, | 24 class NetworkDropdown : public NetworkMenu::Delegate, |
25 public NetworkMenuIcon::Delegate, | 25 public NetworkMenuIcon::Delegate, |
26 NetworkLibrary::NetworkManagerObserver { | 26 NetworkLibrary::NetworkManagerObserver { |
27 public: | 27 public: |
28 NetworkDropdown(content::WebUI* web_ui, bool oobe); | 28 NetworkDropdown(content::WebUI* web_ui, bool oobe); |
29 virtual ~NetworkDropdown(); | 29 virtual ~NetworkDropdown(); |
30 | 30 |
31 // Sets last active network type. Used to show correct disconnected icon. | |
32 void SetLastNetworkType(ConnectionType last_network_type); | |
33 | |
34 // This method should be called, when item with the given id is chosen. | 31 // This method should be called, when item with the given id is chosen. |
35 void OnItemChosen(int id); | 32 void OnItemChosen(int id); |
36 | 33 |
37 // NetworkMenu::Delegate implementation: | 34 // NetworkMenu::Delegate implementation: |
38 virtual gfx::NativeWindow GetNativeWindow() const OVERRIDE; | 35 virtual gfx::NativeWindow GetNativeWindow() const OVERRIDE; |
39 virtual void OpenButtonOptions() OVERRIDE; | 36 virtual void OpenButtonOptions() OVERRIDE; |
40 virtual bool ShouldOpenButtonOptions() const OVERRIDE; | 37 virtual bool ShouldOpenButtonOptions() const OVERRIDE; |
41 | 38 |
42 // NetworkMenuIcon::Delegate implementation: | 39 // NetworkMenuIcon::Delegate implementation: |
43 virtual void NetworkMenuIconChanged() OVERRIDE; | 40 virtual void NetworkMenuIconChanged() OVERRIDE; |
(...skipping 25 matching lines...) Expand all Loading... |
69 | 66 |
70 // Timer used to periodically force network scan. | 67 // Timer used to periodically force network scan. |
71 base::RepeatingTimer<NetworkDropdown> network_scan_timer_; | 68 base::RepeatingTimer<NetworkDropdown> network_scan_timer_; |
72 | 69 |
73 DISALLOW_COPY_AND_ASSIGN(NetworkDropdown); | 70 DISALLOW_COPY_AND_ASSIGN(NetworkDropdown); |
74 }; | 71 }; |
75 | 72 |
76 } // namespace chromeos | 73 } // namespace chromeos |
77 | 74 |
78 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_NETWORK_DROPDOWN_H_ | 75 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_NETWORK_DROPDOWN_H_ |
OLD | NEW |