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 #ifndef CHROME_BROWSER_UI_GTK_AUTOFILL_AUTOFILL_EXTERNAL_DELEGATE_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_AUTOFILL_AUTOFILL_EXTERNAL_DELEGATE_GTK_H_ |
6 #define CHROME_BROWSER_UI_GTK_AUTOFILL_AUTOFILL_EXTERNAL_DELEGATE_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_AUTOFILL_AUTOFILL_EXTERNAL_DELEGATE_GTK_H_ |
7 | 7 |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "chrome/browser/autofill/autofill_external_delegate.h" | 11 #include "chrome/browser/autofill/autofill_external_delegate.h" |
12 #include "ui/base/gtk/gtk_signal.h" | 12 #include "ui/base/gtk/gtk_signal.h" |
13 #include "ui/gfx/native_widget_types.h" | 13 #include "ui/gfx/native_widget_types.h" |
14 | 14 |
15 class AutofillPopupViewGtk; | 15 class AutofillPopupViewGtk; |
16 | 16 |
17 namespace content { | |
18 class WebContents; | |
19 } | |
20 | |
21 class AutofillExternalDelegateGtk : public AutofillExternalDelegate { | 17 class AutofillExternalDelegateGtk : public AutofillExternalDelegate { |
22 public: | 18 public: |
23 AutofillExternalDelegateGtk(TabContents* tab_contents, | 19 AutofillExternalDelegateGtk(TabContents* tab_contents, |
24 AutofillManager* autofill_manager); | 20 AutofillManager* autofill_manager); |
25 | 21 |
26 virtual ~AutofillExternalDelegateGtk(); | 22 virtual ~AutofillExternalDelegateGtk(); |
27 | 23 |
28 protected: | 24 protected: |
29 // AutofillExternalDelegate implementations. | 25 // AutofillExternalDelegate implementations. |
30 virtual void HideAutofillPopupInternal() OVERRIDE; | 26 virtual void HideAutofillPopupInternal() OVERRIDE; |
(...skipping 12 matching lines...) Expand all Loading... |
43 private: | 39 private: |
44 // Create a valid view to display the autofill results if one doesn't | 40 // Create a valid view to display the autofill results if one doesn't |
45 // currently exist. | 41 // currently exist. |
46 void CreateViewIfNeeded(); | 42 void CreateViewIfNeeded(); |
47 | 43 |
48 CHROMEGTK_CALLBACK_1(AutofillExternalDelegateGtk, gboolean, | 44 CHROMEGTK_CALLBACK_1(AutofillExternalDelegateGtk, gboolean, |
49 HandleViewFocusOut, GdkEventFocus*); | 45 HandleViewFocusOut, GdkEventFocus*); |
50 | 46 |
51 scoped_ptr<AutofillPopupViewGtk> view_; | 47 scoped_ptr<AutofillPopupViewGtk> view_; |
52 | 48 |
53 content::WebContents* web_contents_; // Weak reference. | |
54 gfx::NativeView tab_native_view_; // Weak reference. | 49 gfx::NativeView tab_native_view_; // Weak reference. |
55 | 50 |
56 // The handler value for the focus out event, allows us to block and unblock | 51 // The handler value for the focus out event, allows us to block and unblock |
57 // it as needed. | 52 // it as needed. |
58 gulong event_handler_id_; | 53 gulong event_handler_id_; |
59 | 54 |
60 DISALLOW_COPY_AND_ASSIGN(AutofillExternalDelegateGtk); | 55 DISALLOW_COPY_AND_ASSIGN(AutofillExternalDelegateGtk); |
61 }; | 56 }; |
62 | 57 |
63 #endif // CHROME_BROWSER_UI_GTK_AUTOFILL_AUTOFILL_EXTERNAL_DELEGATE_GTK_H_ | 58 #endif // CHROME_BROWSER_UI_GTK_AUTOFILL_AUTOFILL_EXTERNAL_DELEGATE_GTK_H_ |
OLD | NEW |