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_SCREEN_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_NETWORK_SCREEN_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_NETWORK_SCREEN_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_NETWORK_SCREEN_HANDLER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "chrome/browser/chromeos/base/locale_util.h" | 13 #include "chrome/browser/chromeos/base/locale_util.h" |
14 #include "chrome/browser/chromeos/login/screens/network_view.h" | 14 #include "chrome/browser/chromeos/login/screens/network_view.h" |
15 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" | 15 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" |
16 #include "ui/base/ime/chromeos/component_extension_ime_manager.h" | 16 #include "ui/base/ime/chromeos/component_extension_ime_manager.h" |
17 #include "ui/base/ime/chromeos/input_method_manager.h" | 17 #include "ui/base/ime/chromeos/input_method_manager.h" |
18 #include "ui/gfx/geometry/point.h" | 18 #include "ui/gfx/geometry/point.h" |
19 | 19 |
| 20 namespace base { |
| 21 class ListValue; |
| 22 } |
| 23 |
20 namespace chromeos { | 24 namespace chromeos { |
21 | 25 |
22 class CoreOobeView; | 26 class CoreOobeView; |
23 | 27 |
24 // WebUI implementation of NetworkScreenView. It is used to interact with | 28 // WebUI implementation of NetworkScreenView. It is used to interact with |
25 // the welcome screen (part of the page) of the OOBE. | 29 // the welcome screen (part of the page) of the OOBE. |
26 class NetworkScreenHandler : public NetworkView, public BaseScreenHandler { | 30 class NetworkScreenHandler : public NetworkView, public BaseScreenHandler { |
27 public: | 31 public: |
28 explicit NetworkScreenHandler(CoreOobeView* core_oobe_view); | 32 explicit NetworkScreenHandler(CoreOobeView* core_oobe_view); |
29 ~NetworkScreenHandler() override; | 33 ~NetworkScreenHandler() override; |
(...skipping 11 matching lines...) Expand all Loading... |
41 const base::string16& network_id) override; | 45 const base::string16& network_id) override; |
42 void ReloadLocalizedContent() override; | 46 void ReloadLocalizedContent() override; |
43 | 47 |
44 // BaseScreenHandler implementation: | 48 // BaseScreenHandler implementation: |
45 void DeclareLocalizedValues( | 49 void DeclareLocalizedValues( |
46 ::login::LocalizedValuesBuilder* builder) override; | 50 ::login::LocalizedValuesBuilder* builder) override; |
47 void GetAdditionalParameters(base::DictionaryValue* dict) override; | 51 void GetAdditionalParameters(base::DictionaryValue* dict) override; |
48 void Initialize() override; | 52 void Initialize() override; |
49 | 53 |
50 // Returns available timezones. Caller gets the ownership. | 54 // Returns available timezones. Caller gets the ownership. |
51 static base::ListValue* GetTimezoneList(); | 55 static std::unique_ptr<base::ListValue> GetTimezoneList(); |
52 | 56 |
53 CoreOobeView* core_oobe_view_ = nullptr; | 57 CoreOobeView* core_oobe_view_ = nullptr; |
54 NetworkScreen* screen_ = nullptr; | 58 NetworkScreen* screen_ = nullptr; |
55 | 59 |
56 // Keeps whether screen should be shown right after initialization. | 60 // Keeps whether screen should be shown right after initialization. |
57 bool show_on_init_ = false; | 61 bool show_on_init_ = false; |
58 | 62 |
59 // Position of the network control. | 63 // Position of the network control. |
60 gfx::Point network_control_pos_; | 64 gfx::Point network_control_pos_; |
61 | 65 |
62 DISALLOW_COPY_AND_ASSIGN(NetworkScreenHandler); | 66 DISALLOW_COPY_AND_ASSIGN(NetworkScreenHandler); |
63 }; | 67 }; |
64 | 68 |
65 } // namespace chromeos | 69 } // namespace chromeos |
66 | 70 |
67 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_NETWORK_SCREEN_HANDLER_H_ | 71 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_NETWORK_SCREEN_HANDLER_H_ |
OLD | NEW |