OLD | NEW |
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 |
OLD | NEW |