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

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

Issue 8395042: [cros,de-hack] Get rid of singleton for the WebUILoginScreen. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: clang fix Created 9 years, 1 month 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) 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_BASE_SCREEN_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_BASE_SCREEN_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_BASE_SCREEN_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_BASE_SCREEN_HANDLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "content/browser/webui/web_ui.h" 9 #include "content/browser/webui/web_ui.h"
10 #include "ui/gfx/native_widget_types.h"
10 11
11 namespace base { 12 namespace base {
12 class DictionaryValue; 13 class DictionaryValue;
13 } 14 }
14 15
15 namespace chromeos { 16 namespace chromeos {
16 17
17 // Base class for the OOBE/Login WebUI handlers. 18 // Base class for the OOBE/Login WebUI handlers.
18 class BaseScreenHandler : public WebUIMessageHandler { 19 class BaseScreenHandler : public WebUIMessageHandler {
19 public: 20 public:
20 BaseScreenHandler(); 21 BaseScreenHandler();
21 virtual ~BaseScreenHandler(); 22 virtual ~BaseScreenHandler();
22 23
23 // Gets localized strings to be used on the page. 24 // Gets localized strings to be used on the page.
24 virtual void GetLocalizedStrings( 25 virtual void GetLocalizedStrings(
25 base::DictionaryValue* localized_strings) = 0; 26 base::DictionaryValue* localized_strings) = 0;
26 27
27 // This method is called when page is ready. It propagates to inherited class 28 // This method is called when page is ready. It propagates to inherited class
28 // via virtual Initialize() method (see below). 29 // via virtual Initialize() method (see below).
29 void InitializeBase(); 30 void InitializeBase();
30 31
Nikita (slow) 2011/10/31 11:14:18 nit: nuke extra line.
altimofeev 2011/10/31 16:55:52 Done.
32
31 protected: 33 protected:
32 // Called when the page is ready and handler can do initialization. 34 // Called when the page is ready and handler can do initialization.
33 virtual void Initialize() = 0; 35 virtual void Initialize() = 0;
34 36
35 // Show selected WebUI |screen|. Optionally it can pass screen initialization 37 // Show selected WebUI |screen|. Optionally it can pass screen initialization
36 // data via |data| parameter. 38 // data via |data| parameter.
37 void ShowScreen(const char* screen, const base::DictionaryValue* data); 39 void ShowScreen(const char* screen, const base::DictionaryValue* data);
38 40
39 // Whether page is ready. 41 // Whether page is ready.
40 bool page_is_ready() const { return page_is_ready_; } 42 bool page_is_ready() const { return page_is_ready_; }
41 43
44 // Returns the window which shows us.
45 gfx::NativeWindow GetNativeWindow();
46
42 private: 47 private:
43 // Keeps whether page is ready. 48 // Keeps whether page is ready.
44 bool page_is_ready_; 49 bool page_is_ready_;
45 50
46 DISALLOW_COPY_AND_ASSIGN(BaseScreenHandler); 51 DISALLOW_COPY_AND_ASSIGN(BaseScreenHandler);
47 }; 52 };
48 53
49 } // namespace chromeos 54 } // namespace chromeos
50 55
51 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_BASE_SCREEN_HANDLER_H_ 56 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_BASE_SCREEN_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698