OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "chrome/browser/autofill/autofill_external_delegate.h" | |
6 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | |
7 #include "chrome/common/autofill_messages.h" | |
8 #include "content/browser/renderer_host/render_view_host.h" | |
9 | |
10 AutofillExternalDelegate::~AutofillExternalDelegate() { | |
11 } | |
12 | |
13 AutofillExternalDelegate::AutofillExternalDelegate( | |
14 TabContentsWrapper* tab_contents_wrapper) | |
15 : tab_contents_wrapper_(tab_contents_wrapper) { | |
16 } | |
17 | |
18 void AutofillExternalDelegate::SelectAutofillSuggestionAtIndex(int listIndex) { | |
19 RenderViewHost* host = tab_contents_wrapper_->render_view_host(); | |
Ilya Sherman
2011/10/27 11:01:55
nit: How about just storing the RenderViewHost as
John Grabowski
2011/10/27 17:42:21
discussed offline
| |
20 host->Send(new AutofillMsg_SelectAutofillSuggestionAtIndex( | |
21 host->routing_id(), | |
22 listIndex)); | |
23 } | |
24 | |
25 | |
26 // Add a "!defined(OS_YOUROS) for each platform that implements this | |
27 // in an autofill_external_delegate_YOUROS.cc. Currently there are | |
28 // none, so all platforms use the default. | |
29 | |
30 #if !defined(OS_ANDROID) | |
31 | |
32 AutofillExternalDelegate* AutofillExternalDelegate::Create( | |
33 TabContentsWrapper*, AutofillManager*) { | |
34 return NULL; | |
35 } | |
36 | |
37 #endif | |
OLD | NEW |