| 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_AUTOFILL_AUTOFILL_EXTERNAL_DELEGATE_GTK_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_EXTERNAL_DELEGATE_GTK_H_ |
| 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_EXTERNAL_DELEGATE_GTK_H_ | 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_EXTERNAL_DELEGATE_GTK_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
| 10 | 10 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 int query_id, | 33 int query_id, |
| 34 const webkit::forms::FormData& form, | 34 const webkit::forms::FormData& form, |
| 35 const webkit::forms::FormField& field, | 35 const webkit::forms::FormField& field, |
| 36 const gfx::Rect& bounds) OVERRIDE; | 36 const gfx::Rect& bounds) OVERRIDE; |
| 37 virtual void ApplyAutofillSuggestions( | 37 virtual void ApplyAutofillSuggestions( |
| 38 const std::vector<string16>& autofill_values, | 38 const std::vector<string16>& autofill_values, |
| 39 const std::vector<string16>& autofill_labels, | 39 const std::vector<string16>& autofill_labels, |
| 40 const std::vector<string16>& autofill_icons, | 40 const std::vector<string16>& autofill_icons, |
| 41 const std::vector<int>& autofill_unique_ids, | 41 const std::vector<int>& autofill_unique_ids, |
| 42 int separator_index) OVERRIDE; | 42 int separator_index) OVERRIDE; |
| 43 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; |
| 43 | 44 |
| 44 private: | 45 private: |
| 45 // Create a valid view to display the autofill results if one doesn't | 46 // Create a valid view to display the autofill results if one doesn't |
| 46 // currently exist. | 47 // currently exist. |
| 47 void CreateViewIfNeeded(); | 48 void CreateViewIfNeeded(); |
| 48 | 49 |
| 49 CHROMEGTK_CALLBACK_1(AutofillExternalDelegateGtk, gboolean, | 50 CHROMEGTK_CALLBACK_1(AutofillExternalDelegateGtk, gboolean, |
| 50 HandleViewFocusOut, GdkEventFocus*); | 51 HandleViewFocusOut, GdkEventFocus*); |
| 51 | 52 |
| 52 scoped_ptr<AutofillPopupViewGtk> view_; | 53 scoped_ptr<AutofillPopupViewGtk> view_; |
| 53 | 54 |
| 54 content::WebContents* web_contents_; // Weak reference. | 55 content::WebContents* web_contents_; // Weak reference. |
| 55 gfx::NativeView tab_native_view_; // Weak reference. | 56 gfx::NativeView tab_native_view_; // Weak reference. |
| 56 | 57 |
| 57 // The handler value for the focus out event, allows us to block and unblock | 58 // The handler value for the focus out event, allows us to block and unblock |
| 58 // it as needed. | 59 // it as needed. |
| 59 gulong event_handler_id_; | 60 gulong event_handler_id_; |
| 60 | 61 |
| 61 DISALLOW_COPY_AND_ASSIGN(AutofillExternalDelegateGtk); | 62 DISALLOW_COPY_AND_ASSIGN(AutofillExternalDelegateGtk); |
| 62 }; | 63 }; |
| 63 | 64 |
| 64 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_EXTERNAL_DELEGATE_GTK_H_ | 65 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_EXTERNAL_DELEGATE_GTK_H_ |
| OLD | NEW |