| 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/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.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" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 view_->Hide(); | 34 view_->Hide(); |
| 35 view_.reset(); | 35 view_.reset(); |
| 36 | 36 |
| 37 GtkWidget* toplevel = gtk_widget_get_toplevel(tab_native_view_); | 37 GtkWidget* toplevel = gtk_widget_get_toplevel(tab_native_view_); |
| 38 g_signal_handler_disconnect(toplevel, event_handler_id_); | 38 g_signal_handler_disconnect(toplevel, event_handler_id_); |
| 39 } | 39 } |
| 40 | 40 |
| 41 void AutofillExternalDelegateGtk::OnQueryPlatformSpecific( | 41 void AutofillExternalDelegateGtk::OnQueryPlatformSpecific( |
| 42 int query_id, | 42 int query_id, |
| 43 const webkit::forms::FormData& form, | 43 const FormData& form, |
| 44 const webkit::forms::FormField& field, | 44 const FormFieldData& field, |
| 45 const gfx::Rect& bounds) { | 45 const gfx::Rect& bounds) { |
| 46 CreateViewIfNeeded(); | 46 CreateViewIfNeeded(); |
| 47 view_->set_element_bounds(bounds); | 47 view_->set_element_bounds(bounds); |
| 48 } | 48 } |
| 49 | 49 |
| 50 void AutofillExternalDelegateGtk::ApplyAutofillSuggestions( | 50 void AutofillExternalDelegateGtk::ApplyAutofillSuggestions( |
| 51 const std::vector<string16>& autofill_values, | 51 const std::vector<string16>& autofill_values, |
| 52 const std::vector<string16>& autofill_labels, | 52 const std::vector<string16>& autofill_labels, |
| 53 const std::vector<string16>& autofill_icons, | 53 const std::vector<string16>& autofill_icons, |
| 54 const std::vector<int>& autofill_unique_ids) { | 54 const std::vector<int>& autofill_unique_ids) { |
| (...skipping 26 matching lines...) Expand all Loading... |
| 81 this); | 81 this); |
| 82 } | 82 } |
| 83 } | 83 } |
| 84 | 84 |
| 85 gboolean AutofillExternalDelegateGtk::HandleViewFocusOut(GtkWidget* sender, | 85 gboolean AutofillExternalDelegateGtk::HandleViewFocusOut(GtkWidget* sender, |
| 86 GdkEventFocus* event) { | 86 GdkEventFocus* event) { |
| 87 HideAutofillPopup(); | 87 HideAutofillPopup(); |
| 88 | 88 |
| 89 return TRUE; | 89 return TRUE; |
| 90 } | 90 } |
| OLD | NEW |