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 chromeos { | 20 namespace chromeos { |
21 | 21 |
22 class CoreOobeActor; | 22 class CoreOobeView; |
23 | 23 |
24 // WebUI implementation of NetworkScreenActor. It is used to interact with | 24 // WebUI implementation of NetworkScreenView. It is used to interact with |
25 // the welcome screen (part of the page) of the OOBE. | 25 // the welcome screen (part of the page) of the OOBE. |
26 class NetworkScreenHandler : public NetworkView, public BaseScreenHandler { | 26 class NetworkScreenHandler : public NetworkView, public BaseScreenHandler { |
27 public: | 27 public: |
28 explicit NetworkScreenHandler(CoreOobeActor* core_oobe_actor); | 28 explicit NetworkScreenHandler(CoreOobeView* core_oobe_view); |
29 ~NetworkScreenHandler() override; | 29 ~NetworkScreenHandler() override; |
30 | 30 |
31 private: | 31 private: |
32 // NetworkView implementation: | 32 // NetworkView implementation: |
33 void Show() override; | 33 void Show() override; |
34 void Hide() override; | 34 void Hide() override; |
35 void Bind(NetworkScreen* screen) override; | 35 void Bind(NetworkScreen* screen) override; |
36 void Unbind() override; | 36 void Unbind() override; |
37 void ShowError(const base::string16& message) override; | 37 void ShowError(const base::string16& message) override; |
38 void ClearErrors() override; | 38 void ClearErrors() override; |
39 void StopDemoModeDetection() override; | 39 void StopDemoModeDetection() override; |
40 void ShowConnectingStatus(bool connecting, | 40 void ShowConnectingStatus(bool connecting, |
41 const base::string16& network_id) override; | 41 const base::string16& network_id) override; |
42 void ReloadLocalizedContent() override; | 42 void ReloadLocalizedContent() override; |
43 | 43 |
44 // BaseScreenHandler implementation: | 44 // BaseScreenHandler implementation: |
45 void DeclareLocalizedValues( | 45 void DeclareLocalizedValues( |
46 ::login::LocalizedValuesBuilder* builder) override; | 46 ::login::LocalizedValuesBuilder* builder) override; |
47 void GetAdditionalParameters(base::DictionaryValue* dict) override; | 47 void GetAdditionalParameters(base::DictionaryValue* dict) override; |
48 void Initialize() override; | 48 void Initialize() override; |
49 | 49 |
50 // Returns available timezones. Caller gets the ownership. | 50 // Returns available timezones. Caller gets the ownership. |
51 static base::ListValue* GetTimezoneList(); | 51 static base::ListValue* GetTimezoneList(); |
52 | 52 |
53 CoreOobeActor* core_oobe_actor_ = nullptr; | 53 CoreOobeView* core_oobe_view_ = nullptr; |
54 NetworkScreen* screen_ = nullptr; | 54 NetworkScreen* screen_ = nullptr; |
55 | 55 |
56 // Keeps whether screen should be shown right after initialization. | 56 // Keeps whether screen should be shown right after initialization. |
57 bool show_on_init_ = false; | 57 bool show_on_init_ = false; |
58 | 58 |
59 // Position of the network control. | 59 // Position of the network control. |
60 gfx::Point network_control_pos_; | 60 gfx::Point network_control_pos_; |
61 | 61 |
62 DISALLOW_COPY_AND_ASSIGN(NetworkScreenHandler); | 62 DISALLOW_COPY_AND_ASSIGN(NetworkScreenHandler); |
63 }; | 63 }; |
64 | 64 |
65 } // namespace chromeos | 65 } // namespace chromeos |
66 | 66 |
67 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_NETWORK_SCREEN_HANDLER_H_ | 67 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_NETWORK_SCREEN_HANDLER_H_ |
OLD | NEW |