[Mac] Change linebreak on paste in Omnibox.
commit4bedd3a885c935614cdea77bc6428397c9d9d931
authorshess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 20 Jun 2012 00:12:32 +0000 (20 00:12 +0000)
committershess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 20 Jun 2012 00:12:32 +0000 (20 00:12 +0000)
tree4f191885053ea36a80b92c40ccf1512331134916
parent898a54d802233f7b8d6c28f75dc5839143b9f465
[Mac] Change linebreak on paste in Omnibox.

Omnibox can't have linebreaks, so the code stripped them so that
pasted wrapped URLs worked.  That breaks pasted search text, such as
street addresses, so convert newlines to spaces if there is other
whitespace present.

Also convert OmniboxViewMac code to use Omnibox version of
GetClipboardText(), so that the code can be cross-platform.

BUG=51971
TEST=See bug.

Review URL: https://chromiumcodereview.appspot.com/10534149

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143090 0039d316-1c4b-4281-b951-d872f2087c98
chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h
chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm
chrome/browser/ui/cocoa/omnibox/omnibox_view_mac_unittest.mm
chrome/browser/ui/omnibox/omnibox_view.cc
chrome/browser/ui/omnibox/omnibox_view_unittest.cc