diff options
author | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-18 19:35:46 +0000 |
---|---|---|
committer | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-18 19:35:46 +0000 |
commit | 6ecc0d5701a9e5e991d977ed2f0e33a23c8d0e16 (patch) | |
tree | a9043d89206df039db660f29baba934ed99eda35 /chrome/browser/autocomplete/autocomplete_edit_view_mac.h | |
parent | 8057b04045dd5881d001d164a42e92d3daa525c3 (diff) | |
download | chromium_src-6ecc0d5701a9e5e991d977ed2f0e33a23c8d0e16.zip chromium_src-6ecc0d5701a9e5e991d977ed2f0e33a23c8d0e16.tar.gz chromium_src-6ecc0d5701a9e5e991d977ed2f0e33a23c8d0e16.tar.bz2 |
[Mac] Implement Paste and Go/Search.
BUG=http://crbug.com/10937
BUG=http://crbug.com/13021
TEST=Omnibox context menu should contain paste and go/search.
Review URL: http://codereview.chromium.org/192008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26603 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/autocomplete_edit_view_mac.h')
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_edit_view_mac.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_mac.h b/chrome/browser/autocomplete/autocomplete_edit_view_mac.h index df7891b..8d038ec 100644 --- a/chrome/browser/autocomplete/autocomplete_edit_view_mac.h +++ b/chrome/browser/autocomplete/autocomplete_edit_view_mac.h @@ -14,6 +14,7 @@ #include "chrome/browser/autocomplete/autocomplete_edit_view.h" #include "chrome/browser/toolbar_model.h" #include "chrome/common/page_transition_types.h" +#include "grit/generated_resources.h" #include "webkit/glue/window_open_disposition.h" class AutocompleteEditController; @@ -113,6 +114,19 @@ class AutocompleteEditViewMac : public AutocompleteEditView { // Called when the user attempts to paste into |field_|. void OnPaste(); + // Returns true if the current clipboard text supports paste and go (or paste + // and search). + bool CanPasteAndGo(); + + // Returns the appropriate "Paste and Go" or "Paste and Search" context menu + // string, depending on what is currently in the clipboard. Must not be + // called unless CanPasteAndGo() returns true. + int GetPasteActionStringId(); + + // Called when the user initiates a "paste and go" or "paste and search" into + // |field_|. + void OnPasteAndGo(); + // Checks if a keyword search is possible and forwards to |model_| // if so. Returns true if the tab should be eaten. bool OnTabPressed(); |