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/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 "chrome/browser/chromeos/login/oobe_display.h" | 8 #include "chrome/browser/chromeos/login/oobe_display.h" |
9 #include "chrome/browser/chromeos/login/webui_login_display.h" | 9 #include "chrome/browser/chromeos/login/webui_login_display.h" |
10 #include "chrome/browser/chromeos/login/webui_login_view.h" | 10 #include "chrome/browser/chromeos/login/webui_login_view.h" |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); | 127 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); |
128 params.bounds = background_bounds(); | 128 params.bounds = background_bounds(); |
129 | 129 |
130 login_window_ = new views::Widget; | 130 login_window_ = new views::Widget; |
131 login_window_->Init(params); | 131 login_window_->Init(params); |
132 login_view_ = new WebUILoginView(); | 132 login_view_ = new WebUILoginView(); |
133 | 133 |
134 login_view_->Init(login_window_); | 134 login_view_->Init(login_window_); |
135 | 135 |
136 #if defined(USE_AURA) | 136 #if defined(USE_AURA) |
137 aura_shell::Shell::GetInstance()->GetContainer( | 137 ash::Shell::GetInstance()->GetContainer( |
138 aura_shell::internal::kShellWindowId_LockScreenContainer)-> | 138 ash::internal::kShellWindowId_LockScreenContainer)-> |
139 AddChild(login_window_->GetNativeView()); | 139 AddChild(login_window_->GetNativeView()); |
140 #endif | 140 #endif |
141 | 141 |
142 login_window_->SetContentsView(login_view_); | 142 login_window_->SetContentsView(login_view_); |
143 login_view_->UpdateWindowType(); | 143 login_view_->UpdateWindowType(); |
144 | 144 |
145 login_window_->Show(); | 145 login_window_->Show(); |
146 #if defined(USE_AURA) | 146 #if defined(USE_AURA) |
147 login_window_->GetNativeView()->SetName("WebUILoginView"); | 147 login_window_->GetNativeView()->SetName("WebUILoginView"); |
148 #endif | 148 #endif |
149 login_view_->OnWindowCreated(); | 149 login_view_->OnWindowCreated(); |
150 } | 150 } |
151 login_view_->LoadURL(url); | 151 login_view_->LoadURL(url); |
152 } | 152 } |
153 | 153 |
154 OobeUI* WebUILoginDisplayHost::GetOobeUI() const { | 154 OobeUI* WebUILoginDisplayHost::GetOobeUI() const { |
155 return static_cast<OobeUI*>(login_view_->GetWebUI()); | 155 return static_cast<OobeUI*>(login_view_->GetWebUI()); |
156 } | 156 } |
157 | 157 |
158 WizardController* WebUILoginDisplayHost::CreateWizardController() { | 158 WizardController* WebUILoginDisplayHost::CreateWizardController() { |
159 // TODO(altimofeev): ensure that WebUI is ready. | 159 // TODO(altimofeev): ensure that WebUI is ready. |
160 OobeDisplay* oobe_display = GetOobeUI(); | 160 OobeDisplay* oobe_display = GetOobeUI(); |
161 return new WizardController(this, oobe_display); | 161 return new WizardController(this, oobe_display); |
162 } | 162 } |
163 | 163 |
164 } // namespace chromeos | 164 } // namespace chromeos |
OLD | NEW |