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

Side by Side Diff: chrome/browser/autofill/autofill_external_delegate.cc

Issue 8892011: Clean up TCW, make it solely a hub for 1:1 observer/helper objects. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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) 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 "base/utf_string_conversions.h" 5 #include "base/utf_string_conversions.h"
6 #include "chrome/browser/autofill/autofill_external_delegate.h" 6 #include "chrome/browser/autofill/autofill_external_delegate.h"
7 #include "chrome/browser/autofill/autofill_manager.h" 7 #include "chrome/browser/autofill/autofill_manager.h"
8 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 8 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
9 #include "chrome/common/autofill_messages.h" 9 #include "chrome/common/autofill_messages.h"
10 #include "chrome/common/chrome_constants.h" 10 #include "chrome/common/chrome_constants.h"
11 #include "content/browser/renderer_host/render_view_host.h" 11 #include "content/browser/renderer_host/render_view_host.h"
12 #include "content/browser/tab_contents/tab_contents.h"
12 #include "grit/generated_resources.h" 13 #include "grit/generated_resources.h"
13 #include "ui/base/l10n/l10n_util.h" 14 #include "ui/base/l10n/l10n_util.h"
14 15
15 AutofillExternalDelegate::~AutofillExternalDelegate() { 16 AutofillExternalDelegate::~AutofillExternalDelegate() {
16 } 17 }
17 18
18 AutofillExternalDelegate::AutofillExternalDelegate( 19 AutofillExternalDelegate::AutofillExternalDelegate(
19 TabContentsWrapper* tab_contents_wrapper) 20 TabContentsWrapper* tab_contents_wrapper)
20 : tab_contents_wrapper_(tab_contents_wrapper), 21 : tab_contents_wrapper_(tab_contents_wrapper),
21 autofill_query_id_(0), 22 autofill_query_id_(0),
22 display_warning_if_disabled_(false), 23 display_warning_if_disabled_(false),
23 has_shown_autofill_popup_for_current_edit_(false) { 24 has_shown_autofill_popup_for_current_edit_(false) {
24 } 25 }
25 26
26 void AutofillExternalDelegate::SelectAutofillSuggestionAtIndex(int listIndex) { 27 void AutofillExternalDelegate::SelectAutofillSuggestionAtIndex(int listIndex) {
27 RenderViewHost* host = tab_contents_wrapper_->render_view_host(); 28 RenderViewHost* host =
29 tab_contents_wrapper_->tab_contents()->render_view_host();
28 host->Send(new AutofillMsg_SelectAutofillSuggestionAtIndex( 30 host->Send(new AutofillMsg_SelectAutofillSuggestionAtIndex(
29 host->routing_id(), 31 host->routing_id(),
30 listIndex)); 32 listIndex));
31 } 33 }
32 34
33 void AutofillExternalDelegate::OnQuery(int query_id, 35 void AutofillExternalDelegate::OnQuery(int query_id,
34 const webkit_glue::FormData& form, 36 const webkit_glue::FormData& form,
35 const webkit_glue::FormField& field, 37 const webkit_glue::FormField& field,
36 const gfx::Rect& bounds, 38 const gfx::Rect& bounds,
37 bool display_warning_if_disabled) { 39 bool display_warning_if_disabled) {
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 // none, so all platforms use the default. 135 // none, so all platforms use the default.
134 136
135 #if !defined(OS_ANDROID) 137 #if !defined(OS_ANDROID)
136 138
137 AutofillExternalDelegate* AutofillExternalDelegate::Create( 139 AutofillExternalDelegate* AutofillExternalDelegate::Create(
138 TabContentsWrapper*, AutofillManager*) { 140 TabContentsWrapper*, AutofillManager*) {
139 return NULL; 141 return NULL;
140 } 142 }
141 143
142 #endif 144 #endif
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_edit.cc ('k') | chrome/browser/autofill/autofill_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698