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

Side by Side Diff: chrome/browser/chromeos/login/simple_web_view_dialog.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
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/webui_login_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/simple_web_view_dialog.h" 5 #include "chrome/browser/chromeos/login/simple_web_view_dialog.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_window_ids.h" 8 #include "ash/shell_window_ids.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 web_view_ = web_view_container_.get(); 145 web_view_ = web_view_container_.get();
146 web_view_->set_owned_by_client(); 146 web_view_->set_owned_by_client();
147 web_view_->GetWebContents()->SetDelegate(this); 147 web_view_->GetWebContents()->SetDelegate(this);
148 web_view_->LoadInitialURL(url); 148 web_view_->LoadInitialURL(url);
149 149
150 WebContents* web_contents = web_view_->GetWebContents(); 150 WebContents* web_contents = web_view_->GetWebContents();
151 DCHECK(web_contents); 151 DCHECK(web_contents);
152 152
153 // Create the password manager that is needed for the proxy. 153 // Create the password manager that is needed for the proxy.
154 PasswordManagerDelegateImpl::CreateForWebContents(web_contents); 154 PasswordManagerDelegateImpl::CreateForWebContents(web_contents);
155 PasswordManager::CreateForWebContentsAndDelegate(
156 web_contents, PasswordManagerDelegateImpl::FromWebContents(web_contents));
157 } 155 }
158 156
159 void SimpleWebViewDialog::Init() { 157 void SimpleWebViewDialog::Init() {
160 toolbar_model_.reset(new ToolbarModelImpl(this)); 158 toolbar_model_.reset(new ToolbarModelImpl(this));
161 159
162 set_background(views::Background::CreateSolidBackground(kDialogColor)); 160 set_background(views::Background::CreateSolidBackground(kDialogColor));
163 161
164 // Back/Forward buttons. 162 // Back/Forward buttons.
165 back_ = new views::ImageButton(this); 163 back_ = new views::ImageButton(this);
166 back_->set_triggerable_event_flags(ui::EF_LEFT_MOUSE_BUTTON | 164 back_->set_triggerable_event_flags(ui::EF_LEFT_MOUSE_BUTTON |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 384
387 void SimpleWebViewDialog::UpdateReload(bool is_loading, bool force) { 385 void SimpleWebViewDialog::UpdateReload(bool is_loading, bool force) {
388 if (reload_) { 386 if (reload_) {
389 reload_->ChangeMode( 387 reload_->ChangeMode(
390 is_loading ? ReloadButton::MODE_STOP : ReloadButton::MODE_RELOAD, 388 is_loading ? ReloadButton::MODE_STOP : ReloadButton::MODE_RELOAD,
391 force); 389 force);
392 } 390 }
393 } 391 }
394 392
395 } // namespace chromeos 393 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/webui_login_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698