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

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

Issue 13633003: Part of multiprofile implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 8 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
OLDNEW
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_view.h" 5 #include "chrome/browser/chromeos/login/webui_login_view.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/system/tray/system_tray.h" 8 #include "ash/system/tray/system_tray.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 145
146 WebUILoginView::~WebUILoginView() { 146 WebUILoginView::~WebUILoginView() {
147 if (ash::Shell::GetInstance()->HasPrimaryStatusArea()) { 147 if (ash::Shell::GetInstance()->HasPrimaryStatusArea()) {
148 ash::Shell::GetInstance()->GetPrimarySystemTray()-> 148 ash::Shell::GetInstance()->GetPrimarySystemTray()->
149 SetNextFocusableView(NULL); 149 SetNextFocusableView(NULL);
150 } 150 }
151 } 151 }
152 152
153 void WebUILoginView::Init(views::Widget* login_window) { 153 void WebUILoginView::Init(views::Widget* login_window) {
154 login_window_ = login_window; 154 login_window_ = login_window;
155 webui_login_ = new views::WebView(ProfileManager::GetDefaultProfile()); 155
156 Profile* signing_profile = ProfileManager::GetSigninProfile();
Nikita (slow) 2013/04/04 12:59:13 nit: signin_profile
157 webui_login_ = new views::WebView(signing_profile);
156 AddChildView(webui_login_); 158 AddChildView(webui_login_);
157 159
158 WebContents* web_contents = webui_login_->GetWebContents(); 160 WebContents* web_contents = webui_login_->GetWebContents();
159 161
160 // Create the password manager that is needed for the proxy. 162 // Create the password manager that is needed for the proxy.
161 PasswordManagerDelegateImpl::CreateForWebContents(web_contents); 163 PasswordManagerDelegateImpl::CreateForWebContents(web_contents);
162 PasswordManager::CreateForWebContentsAndDelegate( 164 PasswordManager::CreateForWebContentsAndDelegate(
163 web_contents, PasswordManagerDelegateImpl::FromWebContents(web_contents)); 165 web_contents, PasswordManagerDelegateImpl::FromWebContents(web_contents));
164 166
165 // LoginHandlerViews uses a constrained window for the password manager view. 167 // LoginHandlerViews uses a constrained window for the password manager view.
166 WebContentsModalDialogManager::CreateForWebContents(web_contents); 168 WebContentsModalDialogManager::CreateForWebContents(web_contents);
167 169
168 web_contents->SetDelegate(this); 170 web_contents->SetDelegate(this);
169 renderer_preferences_util::UpdateFromSystemSettings( 171 renderer_preferences_util::UpdateFromSystemSettings(
170 web_contents->GetMutableRendererPrefs(), 172 web_contents->GetMutableRendererPrefs(),
171 ProfileManager::GetDefaultProfile()); 173 signing_profile);
172 174
173 registrar_.Add(this, 175 registrar_.Add(this,
174 content::NOTIFICATION_WEB_CONTENTS_RENDER_VIEW_HOST_CREATED, 176 content::NOTIFICATION_WEB_CONTENTS_RENDER_VIEW_HOST_CREATED,
175 content::Source<WebContents>(web_contents)); 177 content::Source<WebContents>(web_contents));
176 } 178 }
177 179
178 std::string WebUILoginView::GetClassName() const { 180 std::string WebUILoginView::GetClassName() const {
179 return kViewClassName; 181 return kViewClassName;
180 } 182 }
181 183
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 aura::Env::GetInstance()->set_render_white_bg(true); 380 aura::Env::GetInstance()->set_render_white_bg(true);
379 } 381 }
380 382
381 void WebUILoginView::ReturnFocus(bool reverse) { 383 void WebUILoginView::ReturnFocus(bool reverse) {
382 // Return the focus to the web contents. 384 // Return the focus to the web contents.
383 webui_login_->web_contents()->FocusThroughTabTraversal(reverse); 385 webui_login_->web_contents()->FocusThroughTabTraversal(reverse);
384 GetWidget()->Activate(); 386 GetWidget()->Activate();
385 } 387 }
386 388
387 } // namespace chromeos 389 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698