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

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

Issue 14208014: Simplify adding callbacks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix. Created 7 years, 8 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 | Annotate | Revision Log
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>
9
8 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
9 #include "chrome/browser/chromeos/login/screens/network_screen_actor.h" 11 #include "chrome/browser/chromeos/login/screens/network_screen_actor.h"
10 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" 12 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h"
11 #include "ui/gfx/point.h" 13 #include "ui/gfx/point.h"
12 14
13 namespace base {
14 class ListValue;
15 }
16
17 namespace chromeos { 15 namespace chromeos {
18 16
19 // WebUI implementation of NetworkScreenActor. It is used to interact with 17 // WebUI implementation of NetworkScreenActor. It is used to interact with
20 // the welcome screen (part of the page) of the OOBE. 18 // the welcome screen (part of the page) of the OOBE.
21 class NetworkScreenHandler : public NetworkScreenActor, 19 class NetworkScreenHandler : public NetworkScreenActor,
22 public BaseScreenHandler { 20 public BaseScreenHandler {
23 public: 21 public:
24 NetworkScreenHandler(); 22 NetworkScreenHandler();
25 virtual ~NetworkScreenHandler(); 23 virtual ~NetworkScreenHandler();
26 24
(...skipping 11 matching lines...) Expand all
38 // BaseScreenHandler implementation: 36 // BaseScreenHandler implementation:
39 virtual void DeclareLocalizedValues(LocalizedValuesBuilder* builder) OVERRIDE; 37 virtual void DeclareLocalizedValues(LocalizedValuesBuilder* builder) OVERRIDE;
40 virtual void GetAdditionalParameters(base::DictionaryValue* dict) OVERRIDE; 38 virtual void GetAdditionalParameters(base::DictionaryValue* dict) OVERRIDE;
41 virtual void Initialize() OVERRIDE; 39 virtual void Initialize() OVERRIDE;
42 40
43 // WebUIMessageHandler implementation: 41 // WebUIMessageHandler implementation:
44 virtual void RegisterMessages() OVERRIDE; 42 virtual void RegisterMessages() OVERRIDE;
45 43
46 private: 44 private:
47 // Handles moving off the screen. 45 // Handles moving off the screen.
48 void HandleOnExit(const base::ListValue* args); 46 void HandleOnExit();
49 47
50 // Handles change of the language. 48 // Handles change of the language.
51 void HandleOnLanguageChanged(const base::ListValue* args); 49 void HandleOnLanguageChanged(const std::string& locale);
52 50
53 // Handles change of the input method. 51 // Handles change of the input method.
54 void HandleOnInputMethodChanged(const base::ListValue* args); 52 void HandleOnInputMethodChanged(const std::string& id);
55 53
56 // Returns available languages. Caller gets the ownership. Note, it does 54 // Returns available languages. Caller gets the ownership. Note, it does
57 // depend on the current locale. 55 // depend on the current locale.
58 static base::ListValue* GetLanguageList(); 56 static base::ListValue* GetLanguageList();
59 57
60 // Returns available input methods. Caller gets the ownership. Note, it does 58 // Returns available input methods. Caller gets the ownership. Note, it does
61 // depend on the current locale. 59 // depend on the current locale.
62 static base::ListValue* GetInputMethods(); 60 static base::ListValue* GetInputMethods();
63 61
64 NetworkScreenActor::Delegate* screen_; 62 NetworkScreenActor::Delegate* screen_;
65 63
66 bool is_continue_enabled_; 64 bool is_continue_enabled_;
67 65
68 // Keeps whether screen should be shown right after initialization. 66 // Keeps whether screen should be shown right after initialization.
69 bool show_on_init_; 67 bool show_on_init_;
70 68
71 // Position of the network control. 69 // Position of the network control.
72 gfx::Point network_control_pos_; 70 gfx::Point network_control_pos_;
73 71
74 DISALLOW_COPY_AND_ASSIGN(NetworkScreenHandler); 72 DISALLOW_COPY_AND_ASSIGN(NetworkScreenHandler);
75 }; 73 };
76 74
77 } // namespace chromeos 75 } // namespace chromeos
78 76
79 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_NETWORK_SCREEN_HANDLER_H_ 77 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_NETWORK_SCREEN_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698