diff options
author | dcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-24 04:45:27 +0000 |
---|---|---|
committer | dcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-24 04:45:27 +0000 |
commit | c95efd392aa8835e80b34e1b29dd3a224c4e575b (patch) | |
tree | f8b9ca10e16918f045d003e170dd30bd97e78284 /chrome/browser/cocoa/web_drop_target.h | |
parent | 703f8d749f9cb925a83a531eda5f2a1fd897b230 (diff) | |
download | chromium_src-c95efd392aa8835e80b34e1b29dd3a224c4e575b.zip chromium_src-c95efd392aa8835e80b34e1b29dd3a224c4e575b.tar.gz chromium_src-c95efd392aa8835e80b34e1b29dd3a224c4e575b.tar.bz2 |
Don't populate WebDropData with file URLs when dragging files.
This is the OS X patch. There will be separate patches for Windows and Linux.
BUG=42685
TEST=unit_tests --gtest_filter=WebDropTargetTest.*
Review URL: http://codereview.chromium.org/2095011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48016 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/web_drop_target.h')
-rw-r--r-- | chrome/browser/cocoa/web_drop_target.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/chrome/browser/cocoa/web_drop_target.h b/chrome/browser/cocoa/web_drop_target.h index 63c7288..671b51f 100644 --- a/chrome/browser/cocoa/web_drop_target.h +++ b/chrome/browser/cocoa/web_drop_target.h @@ -4,6 +4,9 @@ #import <Cocoa/Cocoa.h> +#include "base/string16.h" + +class GURL; class RenderViewHost; class TabContents; class WebDropData; @@ -53,11 +56,15 @@ typedef RenderViewHost* RenderViewHostIdentifier; // Public use only for unit tests. @interface WebDropTarget(Testing) -// Populate the URL portion of |data|. There may be more than one, but we only -// handle dropping the first. |data| must not be |NULL|. Returns |YES| if URL -// data was obtained from the pasteboard, |NO| otherwise. -- (BOOL)populateURLAndTitle:(WebDropData*)data - fromPasteboard:(NSPasteboard*)pboard; +// Populate the |url| and |title| with URL data in |pboard|. There may be more +// than one, but we only handle dropping the first. |url| must not be |NULL|; +// |title| is an optional parameter. Returns |YES| if URL data was obtained from +// the pasteboard, |NO| otherwise. If |convertFilenames| is |YES|, the function +// will also attempt to convert filenames in |pboard| to file URLs. +- (BOOL)populateURL:(GURL*)url + andTitle:(string16*)title + fromPasteboard:(NSPasteboard*)pboard + convertingFilenames:(BOOL)convertFilenames; // Given |data|, which should not be nil, fill it in using the contents of the // given pasteboard. - (void)populateWebDropData:(WebDropData*)data |