Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/network_screen_handler.h

Issue 389913002: Moving IME manifests to chrome resources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed duplicated XKB extension loading. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "chrome/browser/chromeos/login/screens/network_screen_actor.h" 12 #include "chrome/browser/chromeos/login/screens/network_screen_actor.h"
13 #include "chrome/browser/chromeos/settings/cros_settings.h" 13 #include "chrome/browser/chromeos/settings/cros_settings.h"
14 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" 14 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h"
15 #include "chromeos/ime/component_extension_ime_manager.h" 15 #include "chromeos/ime/component_extension_ime_manager.h"
16 #include "chromeos/ime/input_method_manager.h" 16 #include "chromeos/ime/input_method_manager.h"
17 #include "ui/gfx/point.h" 17 #include "ui/gfx/point.h"
18 18
19 namespace chromeos { 19 namespace chromeos {
20 20
21 class CoreOobeActor; 21 class CoreOobeActor;
22 class IdleDetector; 22 class IdleDetector;
23 23
24 struct NetworkScreenHandlerOnLanguageChangedCallbackData; 24 struct NetworkScreenHandlerOnLanguageChangedCallbackData;
25 25
26 // WebUI implementation of NetworkScreenActor. It is used to interact with 26 // WebUI implementation of NetworkScreenActor. It is used to interact with
27 // the welcome screen (part of the page) of the OOBE. 27 // the welcome screen (part of the page) of the OOBE.
28 class NetworkScreenHandler : public NetworkScreenActor, 28 class NetworkScreenHandler : public NetworkScreenActor,
29 public BaseScreenHandler, 29 public BaseScreenHandler,
30 public ComponentExtensionIMEManager::Observer,
31 public input_method::InputMethodManager::Observer { 30 public input_method::InputMethodManager::Observer {
32 public: 31 public:
33 explicit NetworkScreenHandler(CoreOobeActor* core_oobe_actor); 32 explicit NetworkScreenHandler(CoreOobeActor* core_oobe_actor);
34 virtual ~NetworkScreenHandler(); 33 virtual ~NetworkScreenHandler();
35 34
36 // NetworkScreenActor implementation: 35 // NetworkScreenActor implementation:
37 virtual void SetDelegate(NetworkScreenActor::Delegate* screen) OVERRIDE; 36 virtual void SetDelegate(NetworkScreenActor::Delegate* screen) OVERRIDE;
38 virtual void PrepareToShow() OVERRIDE; 37 virtual void PrepareToShow() OVERRIDE;
39 virtual void Show() OVERRIDE; 38 virtual void Show() OVERRIDE;
40 virtual void Hide() OVERRIDE; 39 virtual void Hide() OVERRIDE;
41 virtual void ShowError(const base::string16& message) OVERRIDE; 40 virtual void ShowError(const base::string16& message) OVERRIDE;
42 virtual void ClearErrors() OVERRIDE; 41 virtual void ClearErrors() OVERRIDE;
43 virtual void ShowConnectingStatus(bool connecting, 42 virtual void ShowConnectingStatus(bool connecting,
44 const base::string16& network_id) OVERRIDE; 43 const base::string16& network_id) OVERRIDE;
45 virtual void EnableContinue(bool enabled) OVERRIDE; 44 virtual void EnableContinue(bool enabled) OVERRIDE;
46 45
47 // BaseScreenHandler implementation: 46 // BaseScreenHandler implementation:
48 virtual void DeclareLocalizedValues(LocalizedValuesBuilder* builder) OVERRIDE; 47 virtual void DeclareLocalizedValues(LocalizedValuesBuilder* builder) OVERRIDE;
49 virtual void GetAdditionalParameters(base::DictionaryValue* dict) OVERRIDE; 48 virtual void GetAdditionalParameters(base::DictionaryValue* dict) OVERRIDE;
50 virtual void Initialize() OVERRIDE; 49 virtual void Initialize() OVERRIDE;
51 50
52 // WebUIMessageHandler implementation: 51 // WebUIMessageHandler implementation:
53 virtual void RegisterMessages() OVERRIDE; 52 virtual void RegisterMessages() OVERRIDE;
54 53
55 // ComponentExtensionIMEManager::Observer implementation:
56 virtual void OnImeComponentExtensionInitialized() OVERRIDE;
57
58 // InputMethodManager::Observer implementation: 54 // InputMethodManager::Observer implementation:
59 virtual void InputMethodChanged(input_method::InputMethodManager* manager, 55 virtual void InputMethodChanged(input_method::InputMethodManager* manager,
60 bool show_message) OVERRIDE; 56 bool show_message) OVERRIDE;
61 57
62 // Reloads localized contents. 58 // Reloads localized contents.
63 void ReloadLocalizedContent(); 59 void ReloadLocalizedContent();
64 60
65 private: 61 private:
66 // Handles moving off the screen. 62 // Handles moving off the screen.
67 void HandleOnExit(); 63 void HandleOnExit();
(...skipping 26 matching lines...) Expand all
94 bool is_continue_enabled_; 90 bool is_continue_enabled_;
95 91
96 // Keeps whether screen should be shown right after initialization. 92 // Keeps whether screen should be shown right after initialization.
97 bool show_on_init_; 93 bool show_on_init_;
98 94
99 // Position of the network control. 95 // Position of the network control.
100 gfx::Point network_control_pos_; 96 gfx::Point network_control_pos_;
101 97
102 scoped_ptr<CrosSettings::ObserverSubscription> timezone_subscription_; 98 scoped_ptr<CrosSettings::ObserverSubscription> timezone_subscription_;
103 99
104 // True if should reinitialize language and keyboard list once the page
105 // is ready.
106 bool should_reinitialize_language_keyboard_list_;
107
108 // The exact language code selected by user in the menu. 100 // The exact language code selected by user in the menu.
109 std::string selected_language_code_; 101 std::string selected_language_code_;
110 102
111 base::WeakPtrFactory<NetworkScreenHandler> weak_ptr_factory_; 103 base::WeakPtrFactory<NetworkScreenHandler> weak_ptr_factory_;
112 104
113 DISALLOW_COPY_AND_ASSIGN(NetworkScreenHandler); 105 DISALLOW_COPY_AND_ASSIGN(NetworkScreenHandler);
114 }; 106 };
115 107
116 } // namespace chromeos 108 } // namespace chromeos
117 109
118 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_NETWORK_SCREEN_HANDLER_H_ 110 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_NETWORK_SCREEN_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698