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

Side by Side Diff: chrome/browser/chromeos/login/webui_login_display_host.cc

Issue 7382001: [ChromeOS] WebUI OOBE/Login refactoring. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync and address comments in set #1 Created 9 years, 5 months 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 | Annotate | Revision Log
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/webui_login_display_host.h" 5 #include "chrome/browser/chromeos/login/webui_login_display_host.h"
6 6
7 #include "chrome/browser/chromeos/login/oobe_display.h" 7 #include "chrome/browser/chromeos/login/oobe_display.h"
8 #include "chrome/browser/chromeos/login/webui_login_display.h" 8 #include "chrome/browser/chromeos/login/webui_login_display.h"
9 #include "chrome/browser/chromeos/login/webui_login_view.h" 9 #include "chrome/browser/chromeos/login/webui_login_view.h"
10 #include "chrome/browser/chromeos/login/touch_login_view.h" 10 #include "chrome/browser/chromeos/login/touch_login_view.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 void WebUILoginDisplayHost::StartWizard(const std::string& first_screen_name, 75 void WebUILoginDisplayHost::StartWizard(const std::string& first_screen_name,
76 const GURL& start_url) { 76 const GURL& start_url) {
77 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAllowWebUIOobe)) 77 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAllowWebUIOobe))
78 LoadURL(GURL(kOobeURL)); 78 LoadURL(GURL(kOobeURL));
79 BaseLoginDisplayHost::StartWizard(first_screen_name, start_url); 79 BaseLoginDisplayHost::StartWizard(first_screen_name, start_url);
80 } 80 }
81 81
82 void WebUILoginDisplayHost::StartSignInScreen() { 82 void WebUILoginDisplayHost::StartSignInScreen() {
83 if (!login_window_) 83 if (!login_window_)
84 // TODO(fsamuel): Use the OOBE once it's touch-friendly.
85 #if defined(TOUCH_UI)
86 LoadURL(GURL(kLoginURL));
87 #else
88 LoadURL(GURL(kOobeURL)); 84 LoadURL(GURL(kOobeURL));
89 #endif
90 85
91 BaseLoginDisplayHost::StartSignInScreen(); 86 BaseLoginDisplayHost::StartSignInScreen();
92 87
93 OobeUI* oobe_ui = static_cast<OobeUI*>(login_view_->GetWebUI()); 88 OobeUI* oobe_ui = static_cast<OobeUI*>(login_view_->GetWebUI());
94 oobe_ui->ShowSigninScreen(); 89 oobe_ui->ShowSigninScreen();
95 } 90 }
96 91
97 void WebUILoginDisplayHost::LoadURL(const GURL& url) { 92 void WebUILoginDisplayHost::LoadURL(const GURL& url) {
98 if (!login_window_) { 93 if (!login_window_) {
99 views::Widget::InitParams params( 94 views::Widget::InitParams params(
(...skipping 19 matching lines...) Expand all
119 login_view_->LoadURL(url); 114 login_view_->LoadURL(url);
120 } 115 }
121 116
122 WizardController* WebUILoginDisplayHost::CreateWizardController() { 117 WizardController* WebUILoginDisplayHost::CreateWizardController() {
123 // TODO(altimofeev): ensure that WebUI is ready. 118 // TODO(altimofeev): ensure that WebUI is ready.
124 OobeDisplay* oobe_display = static_cast<OobeUI*>(login_view_->GetWebUI()); 119 OobeDisplay* oobe_display = static_cast<OobeUI*>(login_view_->GetWebUI());
125 return new WizardController(this, oobe_display); 120 return new WizardController(this, oobe_display);
126 } 121 }
127 122
128 } // namespace chromeos 123 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698