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

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

Issue 151413008: Move ownership of Password(Generation)Manager to ContentPasswordDriver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Handle WebContents having no PasswordManagerDelegateImpl attached Created 6 years, 10 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) 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 Profile* signin_profile = ProfileHelper::GetSigninProfile(); 161 Profile* signin_profile = ProfileHelper::GetSigninProfile();
162 auth_extension_.reset(new ScopedGaiaAuthExtension(signin_profile)); 162 auth_extension_.reset(new ScopedGaiaAuthExtension(signin_profile));
163 webui_login_ = new views::WebView(signin_profile); 163 webui_login_ = new views::WebView(signin_profile);
164 webui_login_->set_allow_accelerators(true); 164 webui_login_->set_allow_accelerators(true);
165 AddChildView(webui_login_); 165 AddChildView(webui_login_);
166 166
167 WebContents* web_contents = webui_login_->GetWebContents(); 167 WebContents* web_contents = webui_login_->GetWebContents();
168 168
169 // Create the password manager that is needed for the proxy. 169 // Create the password manager that is needed for the proxy.
170 PasswordManagerDelegateImpl::CreateForWebContents(web_contents); 170 PasswordManagerDelegateImpl::CreateForWebContents(web_contents);
171 PasswordManager::CreateForWebContentsAndDelegate(
172 web_contents, PasswordManagerDelegateImpl::FromWebContents(web_contents));
173 171
174 // LoginHandlerViews uses a constrained window for the password manager view. 172 // LoginHandlerViews uses a constrained window for the password manager view.
175 WebContentsModalDialogManager::CreateForWebContents(web_contents); 173 WebContentsModalDialogManager::CreateForWebContents(web_contents);
176 WebContentsModalDialogManager::FromWebContents(web_contents)-> 174 WebContentsModalDialogManager::FromWebContents(web_contents)->
177 SetDelegate(this); 175 SetDelegate(this);
178 176
179 web_contents->SetDelegate(this); 177 web_contents->SetDelegate(this);
180 extensions::ExtensionWebContentsObserver::CreateForWebContents(web_contents); 178 extensions::ExtensionWebContentsObserver::CreateForWebContents(web_contents);
181 WebContentsObserver::Observe(web_contents); 179 WebContentsObserver::Observe(web_contents);
182 renderer_preferences_util::UpdateFromSystemSettings( 180 renderer_preferences_util::UpdateFromSystemSettings(
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 webui_visible_ = true; 442 webui_visible_ = true;
445 } 443 }
446 444
447 void WebUILoginView::ReturnFocus(bool reverse) { 445 void WebUILoginView::ReturnFocus(bool reverse) {
448 // Return the focus to the web contents. 446 // Return the focus to the web contents.
449 webui_login_->web_contents()->FocusThroughTabTraversal(reverse); 447 webui_login_->web_contents()->FocusThroughTabTraversal(reverse);
450 GetWidget()->Activate(); 448 GetWidget()->Activate();
451 } 449 }
452 450
453 } // namespace chromeos 451 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698