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

Side by Side Diff: chrome/browser/password_manager_delegate_impl.cc

Issue 7810002: Move infobar handling to a tab helper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 9 years, 3 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 | « chrome/browser/omnibox_search_hint.cc ('k') | chrome/browser/pdf_unsupported_feature.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) 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/password_manager_delegate_impl.h" 5 #include "chrome/browser/password_manager_delegate_impl.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "chrome/browser/infobars/infobar_tab_helper.h"
9 #include "chrome/browser/password_manager/password_form_manager.h" 10 #include "chrome/browser/password_manager/password_form_manager.h"
10 #include "chrome/browser/password_manager/password_manager.h" 11 #include "chrome/browser/password_manager/password_manager.h"
11 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h" 12 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
12 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 13 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
13 #include "chrome/common/autofill_messages.h" 14 #include "chrome/common/autofill_messages.h"
14 #include "content/browser/renderer_host/render_view_host.h" 15 #include "content/browser/renderer_host/render_view_host.h"
15 #include "grit/chromium_strings.h" 16 #include "grit/chromium_strings.h"
16 #include "grit/generated_resources.h" 17 #include "grit/generated_resources.h"
17 #include "grit/theme_resources_standard.h" 18 #include "grit/theme_resources_standard.h"
18 #include "ui/base/l10n/l10n_util.h" 19 #include "ui/base/l10n/l10n_util.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // PasswordManagerDelegateImpl ------------------------------------------------ 109 // PasswordManagerDelegateImpl ------------------------------------------------
109 110
110 void PasswordManagerDelegateImpl::FillPasswordForm( 111 void PasswordManagerDelegateImpl::FillPasswordForm(
111 const webkit_glue::PasswordFormFillData& form_data) { 112 const webkit_glue::PasswordFormFillData& form_data) {
112 tab_contents_->render_view_host()->Send(new AutofillMsg_FillPasswordForm( 113 tab_contents_->render_view_host()->Send(new AutofillMsg_FillPasswordForm(
113 tab_contents_->render_view_host()->routing_id(), form_data)); 114 tab_contents_->render_view_host()->routing_id(), form_data));
114 } 115 }
115 116
116 void PasswordManagerDelegateImpl::AddSavePasswordInfoBar( 117 void PasswordManagerDelegateImpl::AddSavePasswordInfoBar(
117 PasswordFormManager* form_to_save) { 118 PasswordFormManager* form_to_save) {
118 tab_contents_->AddInfoBar(new SavePasswordInfoBarDelegate( 119 tab_contents_->infobar_tab_helper()->AddInfoBar(
119 tab_contents_->tab_contents(), form_to_save)); 120 new SavePasswordInfoBarDelegate(
121 tab_contents_->tab_contents(), form_to_save));
120 } 122 }
121 123
122 Profile* PasswordManagerDelegateImpl::GetProfileForPasswordManager() { 124 Profile* PasswordManagerDelegateImpl::GetProfileForPasswordManager() {
123 return tab_contents_->profile(); 125 return tab_contents_->profile();
124 } 126 }
125 127
126 bool PasswordManagerDelegateImpl::DidLastPageLoadEncounterSSLErrors() { 128 bool PasswordManagerDelegateImpl::DidLastPageLoadEncounterSSLErrors() {
127 return tab_contents_->controller().ssl_manager()-> 129 return tab_contents_->controller().ssl_manager()->
128 ProcessedSSLErrorFromRequest(); 130 ProcessedSSLErrorFromRequest();
129 } 131 }
OLDNEW
« no previous file with comments | « chrome/browser/omnibox_search_hint.cc ('k') | chrome/browser/pdf_unsupported_feature.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698