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/ui/gtk/autofill/autofill_external_delegate_gtk.h" | 5 #include "chrome/browser/ui/gtk/autofill/autofill_external_delegate_gtk.h" |
6 | 6 |
7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
8 #include "chrome/browser/ui/gtk/autofill/autofill_popup_view_gtk.h" | 8 #include "chrome/browser/ui/gtk/autofill/autofill_popup_view_gtk.h" |
9 #include "chrome/browser/ui/gtk/gtk_theme_service.h" | 9 #include "chrome/browser/ui/gtk/gtk_theme_service.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 void AutofillExternalDelegate::CreateForWebContentsAndManager( | 13 void AutofillExternalDelegate::CreateForWebContentsAndManager( |
14 content::WebContents* web_contents, | 14 content::WebContents* web_contents, |
15 AutofillManager* autofill_manager) { | 15 AutofillManager* autofill_manager) { |
16 if (FromWebContents(web_contents)) | 16 if (FromWebContents(web_contents)) |
17 return; | 17 return; |
18 | 18 |
19 web_contents->SetUserData( | 19 web_contents->SetUserData( |
20 &kLocatorKey, | 20 UserDataKey(), |
21 new AutofillExternalDelegateGtk(web_contents, autofill_manager)); | 21 new AutofillExternalDelegateGtk(web_contents, autofill_manager)); |
22 } | 22 } |
23 | 23 |
24 AutofillExternalDelegateGtk::AutofillExternalDelegateGtk( | 24 AutofillExternalDelegateGtk::AutofillExternalDelegateGtk( |
25 content::WebContents* web_contents, | 25 content::WebContents* web_contents, |
26 AutofillManager* autofill_manager) | 26 AutofillManager* autofill_manager) |
27 : AutofillExternalDelegate(web_contents, autofill_manager), | 27 : AutofillExternalDelegate(web_contents, autofill_manager), |
28 event_handler_id_(0) { | 28 event_handler_id_(0) { |
29 tab_native_view_ = web_contents->GetView()->GetNativeView(); | 29 tab_native_view_ = web_contents->GetView()->GetNativeView(); |
30 } | 30 } |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 this); | 88 this); |
89 } | 89 } |
90 } | 90 } |
91 | 91 |
92 gboolean AutofillExternalDelegateGtk::HandleViewFocusOut(GtkWidget* sender, | 92 gboolean AutofillExternalDelegateGtk::HandleViewFocusOut(GtkWidget* sender, |
93 GdkEventFocus* event) { | 93 GdkEventFocus* event) { |
94 HideAutofillPopup(); | 94 HideAutofillPopup(); |
95 | 95 |
96 return TRUE; | 96 return TRUE; |
97 } | 97 } |
OLD | NEW |