OLD | NEW |
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 #include "chrome/browser/chromeos/login/webui_login_display_host.h" | 5 #include "chrome/browser/chromeos/login/webui_login_display_host.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "chrome/browser/chromeos/login/oobe_display.h" | 9 #include "chrome/browser/chromeos/login/oobe_display.h" |
10 #include "chrome/browser/chromeos/login/webui_login_display.h" | 10 #include "chrome/browser/chromeos/login/webui_login_display.h" |
11 #include "chrome/browser/chromeos/login/webui_login_view.h" | 11 #include "chrome/browser/chromeos/login/webui_login_view.h" |
12 #include "chrome/browser/chromeos/login/wizard_controller.h" | 12 #include "chrome/browser/chromeos/login/wizard_controller.h" |
13 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 13 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
| 14 #include "content/browser/webui/web_ui.h" |
14 #include "ui/views/widget/widget.h" | 15 #include "ui/views/widget/widget.h" |
15 | 16 |
16 #if defined(USE_AURA) | 17 #if defined(USE_AURA) |
17 #include "ash/shell.h" | 18 #include "ash/shell.h" |
18 #include "ash/shell_window_ids.h" | 19 #include "ash/shell_window_ids.h" |
19 #include "ui/aura/window.h" | 20 #include "ui/aura/window.h" |
20 #endif | 21 #endif |
21 | 22 |
22 namespace chromeos { | 23 namespace chromeos { |
23 | 24 |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 login_window_->Show(); | 143 login_window_->Show(); |
143 #if defined(USE_AURA) | 144 #if defined(USE_AURA) |
144 login_window_->GetNativeView()->SetName("WebUILoginView"); | 145 login_window_->GetNativeView()->SetName("WebUILoginView"); |
145 #endif | 146 #endif |
146 login_view_->OnWindowCreated(); | 147 login_view_->OnWindowCreated(); |
147 } | 148 } |
148 login_view_->LoadURL(url); | 149 login_view_->LoadURL(url); |
149 } | 150 } |
150 | 151 |
151 OobeUI* WebUILoginDisplayHost::GetOobeUI() const { | 152 OobeUI* WebUILoginDisplayHost::GetOobeUI() const { |
152 return static_cast<OobeUI*>(login_view_->GetWebUI()); | 153 return static_cast<OobeUI*>(login_view_->GetWebUI()->GetController()); |
153 } | 154 } |
154 | 155 |
155 WizardController* WebUILoginDisplayHost::CreateWizardController() { | 156 WizardController* WebUILoginDisplayHost::CreateWizardController() { |
156 // TODO(altimofeev): ensure that WebUI is ready. | 157 // TODO(altimofeev): ensure that WebUI is ready. |
157 OobeDisplay* oobe_display = GetOobeUI(); | 158 OobeDisplay* oobe_display = GetOobeUI(); |
158 return new WizardController(this, oobe_display); | 159 return new WizardController(this, oobe_display); |
159 } | 160 } |
160 | 161 |
161 } // namespace chromeos | 162 } // namespace chromeos |
OLD | NEW |