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

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

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: comment nit 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 #include "chrome/browser/chromeos/login/base_login_display_host.h"
5 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" 6 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h"
6 7
7 #include "base/values.h" 8 #include "base/values.h"
8 9
9 namespace chromeos { 10 namespace chromeos {
10 11
11 BaseScreenHandler::BaseScreenHandler() : page_is_ready_(false) { 12 BaseScreenHandler::BaseScreenHandler() : page_is_ready_(false) {
12 } 13 }
13 14
14 BaseScreenHandler::~BaseScreenHandler() { 15 BaseScreenHandler::~BaseScreenHandler() {
15 } 16 }
16 17
17 void BaseScreenHandler::InitializeBase() { 18 void BaseScreenHandler::InitializeBase() {
18 page_is_ready_ = true; 19 page_is_ready_ = true;
19 Initialize(); 20 Initialize();
20 } 21 }
21 22
22 void BaseScreenHandler::ShowScreen(const char* screen_name, 23 void BaseScreenHandler::ShowScreen(const char* screen_name,
23 const base::DictionaryValue* data) { 24 const base::DictionaryValue* data) {
24 if (!web_ui_) 25 if (!web_ui_)
25 return; 26 return;
26 DictionaryValue screen_params; 27 DictionaryValue screen_params;
27 screen_params.SetString("id", screen_name); 28 screen_params.SetString("id", screen_name);
28 if (data) 29 if (data)
29 screen_params.SetWithoutPathExpansion("data", data->DeepCopy()); 30 screen_params.SetWithoutPathExpansion("data", data->DeepCopy());
30 web_ui_->CallJavascriptFunction("cr.ui.Oobe.showScreen", screen_params); 31 web_ui_->CallJavascriptFunction("cr.ui.Oobe.showScreen", screen_params);
31 } 32 }
32 33
34
35 gfx::NativeWindow BaseScreenHandler::GetNativeWindow() {
36 return BaseLoginDisplayHost::default_host()->GetNativeWindow();
37 }
38
33 } // namespace chromeos 39 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698