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_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 "chrome/browser/chromeos/status/network_menu.h" | 9 #include "chrome/browser/chromeos/status/network_menu.h" |
10 #include "chrome/browser/chromeos/status/network_menu_icon.h" | 10 #include "chrome/browser/chromeos/status/network_menu_icon.h" |
11 #include "chrome/browser/chromeos/cros/network_library.h" | 11 #include "chrome/browser/chromeos/cros/network_library.h" |
12 #include "ui/gfx/native_widget_types.h" | 12 #include "ui/gfx/native_widget_types.h" |
13 #include "chrome/browser/chromeos/login/login_html_dialog.h" | 13 #include "chrome/browser/chromeos/login/login_html_dialog.h" |
14 | 14 |
15 namespace chromeos { | 15 namespace chromeos { |
16 | 16 |
17 class NetworkMenuWebUI; | 17 class NetworkMenuWebUI; |
18 | 18 |
19 // Class which implements network dropdown menu using WebUI. | 19 // Class which implements network dropdown menu using WebUI. |
20 class NetworkDropdown : public NetworkMenu::Delegate, | 20 class NetworkDropdown : public NetworkMenu::Delegate, |
21 public NetworkMenuIcon::Delegate, | 21 public NetworkMenuIcon::Delegate, |
22 NetworkLibrary::NetworkManagerObserver, | 22 NetworkLibrary::NetworkManagerObserver, |
23 public LoginHtmlDialog::Delegate { | 23 public LoginHtmlDialog::Delegate { |
24 public: | 24 public: |
25 NetworkDropdown(WebUI* web_ui, gfx::NativeWindow parent_window, bool oobe); | 25 NetworkDropdown(WebUI* web_ui, gfx::NativeWindow parent_window, bool oobe); |
26 virtual ~NetworkDropdown(); | 26 virtual ~NetworkDropdown(); |
27 | 27 |
| 28 // Sets last active network type. Used to show correct disconnected icon. |
| 29 void SetLastNetworkType(ConnectionType last_network_type); |
| 30 |
28 // 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. |
29 void OnItemChosen(int id); | 32 void OnItemChosen(int id); |
30 | 33 |
31 // NetworkMenu::Delegate implementation: | 34 // NetworkMenu::Delegate implementation: |
32 virtual views::MenuButton* GetMenuButton() OVERRIDE; | 35 virtual views::MenuButton* GetMenuButton() OVERRIDE; |
33 virtual gfx::NativeWindow GetNativeWindow() const OVERRIDE; | 36 virtual gfx::NativeWindow GetNativeWindow() const OVERRIDE; |
34 virtual void OpenButtonOptions() OVERRIDE; | 37 virtual void OpenButtonOptions() OVERRIDE; |
35 virtual bool ShouldOpenButtonOptions() const OVERRIDE; | 38 virtual bool ShouldOpenButtonOptions() const OVERRIDE; |
36 | 39 |
37 // NetworkMenuIcon::Delegate implementation: | 40 // NetworkMenuIcon::Delegate implementation: |
(...skipping 27 matching lines...) Expand all Loading... |
65 | 68 |
66 // Is the dropdown shown on one of the OOBE screens. | 69 // Is the dropdown shown on one of the OOBE screens. |
67 bool oobe_; | 70 bool oobe_; |
68 | 71 |
69 DISALLOW_COPY_AND_ASSIGN(NetworkDropdown); | 72 DISALLOW_COPY_AND_ASSIGN(NetworkDropdown); |
70 }; | 73 }; |
71 | 74 |
72 } // namespace chromeos | 75 } // namespace chromeos |
73 | 76 |
74 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_NETWORK_DROPDOWN_H_ | 77 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_NETWORK_DROPDOWN_H_ |
OLD | NEW |