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

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

Issue 184103016: Autofill: Refactoring to support fetching password after a username is selected (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Actually fix compile failure. Created 6 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 | 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"
11 #include "chrome/app/chrome_command_ids.h" 11 #include "chrome/app/chrome_command_ids.h"
12 #include "chrome/browser/chromeos/login/captive_portal_window_proxy.h" 12 #include "chrome/browser/chromeos/login/captive_portal_window_proxy.h"
13 #include "chrome/browser/chromeos/login/helper.h" 13 #include "chrome/browser/chromeos/login/helper.h"
14 #include "chrome/browser/command_updater.h" 14 #include "chrome/browser/command_updater.h"
15 #include "chrome/browser/password_manager/chrome_password_manager_client.h" 15 #include "chrome/browser/password_manager/chrome_password_manager_client.h"
16 #include "chrome/browser/profiles/profile.h" 16 #include "chrome/browser/profiles/profile.h"
17 #include "chrome/browser/ui/autofill/tab_autofill_manager_delegate.h"
17 #include "chrome/browser/ui/browser.h" 18 #include "chrome/browser/ui/browser.h"
18 #include "chrome/browser/ui/content_settings/content_setting_bubble_model_delega te.h" 19 #include "chrome/browser/ui/content_settings/content_setting_bubble_model_delega te.h"
19 #include "chrome/browser/ui/toolbar/toolbar_model_impl.h" 20 #include "chrome/browser/ui/toolbar/toolbar_model_impl.h"
20 #include "chrome/browser/ui/view_ids.h" 21 #include "chrome/browser/ui/view_ids.h"
21 #include "chrome/browser/ui/views/location_bar/location_icon_view.h" 22 #include "chrome/browser/ui/views/location_bar/location_icon_view.h"
22 #include "chrome/browser/ui/views/toolbar/reload_button.h" 23 #include "chrome/browser/ui/views/toolbar/reload_button.h"
23 #include "components/password_manager/core/browser/password_manager.h" 24 #include "components/password_manager/core/browser/password_manager.h"
24 #include "content/public/browser/navigation_controller.h" 25 #include "content/public/browser/navigation_controller.h"
25 #include "content/public/browser/navigation_entry.h" 26 #include "content/public/browser/navigation_entry.h"
26 #include "content/public/browser/web_contents.h" 27 #include "content/public/browser/web_contents.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 web_view_container_.reset(new views::WebView(profile_)); 147 web_view_container_.reset(new views::WebView(profile_));
147 web_view_ = web_view_container_.get(); 148 web_view_ = web_view_container_.get();
148 web_view_->set_owned_by_client(); 149 web_view_->set_owned_by_client();
149 web_view_->GetWebContents()->SetDelegate(this); 150 web_view_->GetWebContents()->SetDelegate(this);
150 web_view_->LoadInitialURL(url); 151 web_view_->LoadInitialURL(url);
151 152
152 WebContents* web_contents = web_view_->GetWebContents(); 153 WebContents* web_contents = web_view_->GetWebContents();
153 DCHECK(web_contents); 154 DCHECK(web_contents);
154 155
155 // Create the password manager that is needed for the proxy. 156 // Create the password manager that is needed for the proxy.
156 ChromePasswordManagerClient::CreateForWebContents(web_contents); 157 ChromePasswordManagerClient::CreateForWebContentsWithAutofillManagerDelegate(
158 web_contents,
159 autofill::TabAutofillManagerDelegate::FromWebContents(web_contents));
157 } 160 }
158 161
159 void SimpleWebViewDialog::Init() { 162 void SimpleWebViewDialog::Init() {
160 toolbar_model_.reset(new ToolbarModelImpl(this)); 163 toolbar_model_.reset(new ToolbarModelImpl(this));
161 164
162 set_background(views::Background::CreateSolidBackground(kDialogColor)); 165 set_background(views::Background::CreateSolidBackground(kDialogColor));
163 166
164 // Back/Forward buttons. 167 // Back/Forward buttons.
165 back_ = new views::ImageButton(this); 168 back_ = new views::ImageButton(this);
166 back_->set_triggerable_event_flags(ui::EF_LEFT_MOUSE_BUTTON | 169 back_->set_triggerable_event_flags(ui::EF_LEFT_MOUSE_BUTTON |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 391
389 void SimpleWebViewDialog::UpdateReload(bool is_loading, bool force) { 392 void SimpleWebViewDialog::UpdateReload(bool is_loading, bool force) {
390 if (reload_) { 393 if (reload_) {
391 reload_->ChangeMode( 394 reload_->ChangeMode(
392 is_loading ? ReloadButton::MODE_STOP : ReloadButton::MODE_RELOAD, 395 is_loading ? ReloadButton::MODE_STOP : ReloadButton::MODE_RELOAD,
393 force); 396 force);
394 } 397 }
395 } 398 }
396 399
397 } // namespace chromeos 400 } // 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