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" |
11 #include "chrome/browser/chromeos/login/wizard_controller.h" | 11 #include "chrome/browser/chromeos/login/wizard_controller.h" |
12 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 12 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
13 #include "views/widget/widget.h" | 13 #include "views/widget/widget.h" |
14 | 14 |
15 namespace chromeos { | 15 namespace chromeos { |
16 | 16 |
17 namespace { | 17 namespace { |
18 | 18 |
19 // URL which corresponds to the login WebUI. | 19 // URL which corresponds to the login WebUI. |
20 const char kLoginURL[] = "chrome://login"; | 20 const char kLoginURL[] = "chrome://oobe/login"; |
21 // URL which corresponds to the OOBE WebUI. | 21 // URL which corresponds to the OOBE WebUI. |
22 const char kOobeURL[] = "chrome://oobe"; | 22 const char kOobeURL[] = "chrome://oobe"; |
23 | 23 |
24 } // namespace | 24 } // namespace |
25 | 25 |
26 // WebUILoginDisplayHost ------------------------------------------------------- | 26 // WebUILoginDisplayHost ------------------------------------------------------- |
27 | 27 |
28 WebUILoginDisplayHost::WebUILoginDisplayHost(const gfx::Rect& background_bounds) | 28 WebUILoginDisplayHost::WebUILoginDisplayHost(const gfx::Rect& background_bounds) |
29 : BaseLoginDisplayHost(background_bounds), | 29 : BaseLoginDisplayHost(background_bounds), |
30 login_window_(NULL), | 30 login_window_(NULL), |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 } | 97 } |
98 | 98 |
99 if (!login_window_) | 99 if (!login_window_) |
100 LoadURL(GURL(kOobeURL)); | 100 LoadURL(GURL(kOobeURL)); |
101 | 101 |
102 BaseLoginDisplayHost::StartWizard(first_screen_name, start_url); | 102 BaseLoginDisplayHost::StartWizard(first_screen_name, start_url); |
103 } | 103 } |
104 | 104 |
105 void WebUILoginDisplayHost::StartSignInScreen() { | 105 void WebUILoginDisplayHost::StartSignInScreen() { |
106 if (!login_window_) | 106 if (!login_window_) |
107 LoadURL(GURL(kOobeURL)); | 107 LoadURL(GURL(kLoginURL)); |
108 | 108 |
109 BaseLoginDisplayHost::StartSignInScreen(); | 109 BaseLoginDisplayHost::StartSignInScreen(); |
110 GetOobeUI()->ShowSigninScreen(); | 110 GetOobeUI()->ShowSigninScreen(); |
111 } | 111 } |
112 | 112 |
113 void WebUILoginDisplayHost::LoadURL(const GURL& url) { | 113 void WebUILoginDisplayHost::LoadURL(const GURL& url) { |
114 if (!login_window_) { | 114 if (!login_window_) { |
115 views::Widget::InitParams params( | 115 views::Widget::InitParams params( |
116 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); | 116 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); |
117 params.bounds = background_bounds(); | 117 params.bounds = background_bounds(); |
(...skipping 17 matching lines...) Expand all Loading... |
135 return static_cast<OobeUI*>(login_view_->GetWebUI()); | 135 return static_cast<OobeUI*>(login_view_->GetWebUI()); |
136 } | 136 } |
137 | 137 |
138 WizardController* WebUILoginDisplayHost::CreateWizardController() { | 138 WizardController* WebUILoginDisplayHost::CreateWizardController() { |
139 // TODO(altimofeev): ensure that WebUI is ready. | 139 // TODO(altimofeev): ensure that WebUI is ready. |
140 OobeDisplay* oobe_display = GetOobeUI(); | 140 OobeDisplay* oobe_display = GetOobeUI(); |
141 return new WizardController(this, oobe_display); | 141 return new WizardController(this, oobe_display); |
142 } | 142 } |
143 | 143 |
144 } // namespace chromeos | 144 } // namespace chromeos |
OLD | NEW |