Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1012)

Unified Diff: chrome/browser/cocoa/autocomplete_text_field.h

Issue 207047: [Mac] Convert Omnibox paste-and-go to use AutocompleteTextFieldObserver. (Closed)
Patch Set: Oops - remove test before its time. Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/cocoa/autocomplete_text_field.h
diff --git a/chrome/browser/cocoa/autocomplete_text_field.h b/chrome/browser/cocoa/autocomplete_text_field.h
index 2f87c43ca25088d408036391f4e04157181aa4af..9c8b1c5a2e292650735bf88a80b76c9375c6b4f4 100644
--- a/chrome/browser/cocoa/autocomplete_text_field.h
+++ b/chrome/browser/cocoa/autocomplete_text_field.h
@@ -35,14 +35,21 @@ class AutocompleteTextFieldObserver {
// Called when the user pastes into the field.
virtual void OnPaste() = 0;
-};
-@protocol AutocompleteTextFieldDelegateMethods
-// Returns nil if paste actions are not supported.
-- (NSString*)control:(NSControl*)control
- textPasteActionString:(NSText*)fieldEditor;
-- (void)control:(NSControl*)control textDidPasteAndGo:(NSText*)fieldEditor;
-@end
+ // Returns true if the current clipboard text supports paste and go
+ // (or paste and search).
+ virtual bool CanPasteAndGo() = 0;
+
+ // 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.
+ virtual int GetPasteActionStringId() = 0;
+
+ // Called when the user initiates a "paste and go" or "paste and
+ // search" into |field_|.
+ virtual void OnPasteAndGo() = 0;
+};
@interface AutocompleteTextField : NSTextField {
@private
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_popup_view_mac.mm ('k') | chrome/browser/cocoa/autocomplete_text_field.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698