OLD | NEW |
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/autofill/autofill_external_delegate_gtk.h" | 5 #include "chrome/browser/autofill/autofill_external_delegate_gtk.h" |
6 | 6 |
7 #include "chrome/browser/ui/gtk/autofill/autofill_popup_view_gtk.h" | 7 #include "chrome/browser/ui/gtk/autofill/autofill_popup_view_gtk.h" |
8 #include "chrome/browser/ui/gtk/gtk_theme_service.h" | 8 #include "chrome/browser/ui/gtk/gtk_theme_service.h" |
9 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 9 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
10 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
11 #include "content/public/browser/web_contents_view.h" | 11 #include "content/public/browser/web_contents_view.h" |
12 | 12 |
13 AutofillExternalDelegate* AutofillExternalDelegate::Create( | 13 AutofillExternalDelegate* AutofillExternalDelegate::Create( |
14 TabContentsWrapper* tab_contents_wrapper, | 14 TabContents* tab_contents, |
15 AutofillManager* autofill_manager) { | 15 AutofillManager* autofill_manager) { |
16 return new AutofillExternalDelegateGtk(tab_contents_wrapper, | 16 return new AutofillExternalDelegateGtk(tab_contents, |
17 autofill_manager); | 17 autofill_manager); |
18 } | 18 } |
19 | 19 |
20 AutofillExternalDelegateGtk::AutofillExternalDelegateGtk( | 20 AutofillExternalDelegateGtk::AutofillExternalDelegateGtk( |
21 TabContentsWrapper* tab_contents_wrapper, | 21 TabContents* tab_contents, |
22 AutofillManager* autofill_manager) | 22 AutofillManager* autofill_manager) |
23 : AutofillExternalDelegate(tab_contents_wrapper, autofill_manager), | 23 : AutofillExternalDelegate(tab_contents, autofill_manager), |
24 web_contents_(tab_contents_wrapper->web_contents()), | 24 web_contents_(tab_contents->web_contents()), |
25 event_handler_id_(0) { | 25 event_handler_id_(0) { |
26 tab_native_view_ = web_contents_->GetView()->GetNativeView(); | 26 tab_native_view_ = web_contents_->GetView()->GetNativeView(); |
27 } | 27 } |
28 | 28 |
29 AutofillExternalDelegateGtk::~AutofillExternalDelegateGtk() { | 29 AutofillExternalDelegateGtk::~AutofillExternalDelegateGtk() { |
30 } | 30 } |
31 | 31 |
32 void AutofillExternalDelegateGtk::HideAutofillPopupInternal() { | 32 void AutofillExternalDelegateGtk::HideAutofillPopupInternal() { |
33 if (!view_.get()) | 33 if (!view_.get()) |
34 return; | 34 return; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 this); | 83 this); |
84 } | 84 } |
85 } | 85 } |
86 | 86 |
87 gboolean AutofillExternalDelegateGtk::HandleViewFocusOut(GtkWidget* sender, | 87 gboolean AutofillExternalDelegateGtk::HandleViewFocusOut(GtkWidget* sender, |
88 GdkEventFocus* event) { | 88 GdkEventFocus* event) { |
89 HideAutofillPopup(); | 89 HideAutofillPopup(); |
90 | 90 |
91 return TRUE; | 91 return TRUE; |
92 } | 92 } |
OLD | NEW |