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

Unified Diff: chrome/browser/autocomplete/autocomplete_edit_view_mac.h

Issue 159018: [Mac] Strip newlines from paste. (Closed)
Patch Set: Test empty clipboard Created 11 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_edit_view_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/autocomplete_edit_view_mac.h
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_mac.h b/chrome/browser/autocomplete/autocomplete_edit_view_mac.h
index 7c70b4c62f38f511dcaca1f26269eef3e47a00fa..ac0c712db5f900e1d11cd6227906a8dc3dfb0b4a 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_mac.h
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_mac.h
@@ -21,6 +21,7 @@ class AutocompleteEditController;
class AutocompleteEditModel;
class AutocompletePopupViewMac;
@class AutocompleteTextField;
+class Clipboard;
class CommandUpdater;
class Profile;
class TabContents;
@@ -99,11 +100,18 @@ class AutocompleteEditViewMac : public AutocompleteEditView {
// visual state (such as closing the popup).
void OnDidResignKey();
+ // Called when the user attempts to paste into |field_|.
+ void OnPaste();
+
void AcceptInput(WindowOpenDisposition disposition, bool for_drop);
// Helper for LocationBarViewMac. Selects all in |field_|.
void FocusLocation();
+ // Helper to get appropriate contents from |clipboard|. Returns
+ // empty string if no appropriate data is found on |clipboard|.
+ static std::wstring GetClipboardText(Clipboard* clipboard);
+
private:
// Returns the field's currently selected range. Only valid if the
// field has focus.
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_edit_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698