diff options
author | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-13 19:52:36 +0000 |
---|---|---|
committer | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-13 19:52:36 +0000 |
commit | f3035449a5a79955c8cbddaccbfdb18e7d97ba3a (patch) | |
tree | 59a0cc2f36397197d50a90d1a7bab6cf101208f2 /chrome/browser/ui/cocoa/url_drop_target.h | |
parent | 0423c02392562f5c7639ad634136ee0b445d2987 (diff) | |
download | chromium_src-f3035449a5a79955c8cbddaccbfdb18e7d97ba3a.zip chromium_src-f3035449a5a79955c8cbddaccbfdb18e7d97ba3a.tar.gz chromium_src-f3035449a5a79955c8cbddaccbfdb18e7d97ba3a.tar.bz2 |
Add TEXT_PLAIN as a drag and drop target. And accept TEXT_PLAIN as a target at CompleteDrop(). In the function classify the word and make the URL.(Linux)
If the drop source is not URL, use the source as plain text and pass it to tab_strip_controller and classify it. To pass if the source is URL or plain text, use is_plain_text flag. (Mac)
patch from takano.naoki@gmail.com
BUG=42797
TEST= 1. Open any site which has text. (news.google.com) 2. Select 2-3 words of text and drag n drop selected text to tabstrip. 3. Chrome opens a new tab with search results (using selected search engine in preferences).
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69034 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/cocoa/url_drop_target.h')
-rw-r--r-- | chrome/browser/ui/cocoa/url_drop_target.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/ui/cocoa/url_drop_target.h b/chrome/browser/ui/cocoa/url_drop_target.h index abfefb3..ea57026 100644 --- a/chrome/browser/ui/cocoa/url_drop_target.h +++ b/chrome/browser/ui/cocoa/url_drop_target.h @@ -58,6 +58,10 @@ // at the given point (in that view's coordinates). - (void)dropURLs:(NSArray*)urls inView:(NSView*)view at:(NSPoint)point; +// The given text was dropped in the given view at the given point (in that +// view's coordinates). +- (void)dropText:(NSString*)text inView:(NSView*)view at:(NSPoint)point; + // Dragging is in progress over the owner view (at the given point, in view // coordinates) and any indicator of location -- e.g., an arrow -- should be // updated/shown. |