diff options
Diffstat (limited to 'chrome/browser/autocomplete/autocomplete_edit_view_gtk.h')
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_edit_view_gtk.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h index d22d90e..70e32f3 100644 --- a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h +++ b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h @@ -9,6 +9,7 @@ #include "base/basictypes.h" #include "base/scoped_ptr.h" +#include "base/string_util.h" #include "chrome/browser/autocomplete/autocomplete_edit_view.h" #include "chrome/browser/toolbar_model.h" #include "chrome/common/owned_widget_gtk.h" @@ -183,6 +184,23 @@ class AutocompleteEditViewGtk : public AutocompleteEditView { } void HandleEditSearchEngines(); + static void HandlePasteAndGoThunk(GtkMenuItem* menuitem, + AutocompleteEditViewGtk* self) { + self->HandlePasteAndGo(); + } + void HandlePasteAndGo(); + + static void HandlePasteAndGoReceivedTextThunk(GtkClipboard* clipboard, + const gchar* text, + gpointer self) { + // If there is nothing to paste (|text| is NULL), do nothing. + if (!text) + return; + reinterpret_cast<AutocompleteEditViewGtk*>(self)-> + HandlePasteAndGoReceivedText(UTF8ToWide(text)); + } + void HandlePasteAndGoReceivedText(const std::wstring& text); + // Get the character indices of the current selection. This honors // direction, cp_max is the insertion point, and cp_min is the bound. CharRange GetSelection(); |