diff options
author | xiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-09 16:04:19 +0000 |
---|---|---|
committer | xiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-09 16:04:19 +0000 |
commit | 46624bf3698811107781e6e6fbaf80622a3f77e8 (patch) | |
tree | f060d5f5cb71efe96ff8250225896c96ce646540 /chrome/browser/tab_contents | |
parent | 77c4f1f19f14c1a6f2c136d0ccb242afbfd6b7c4 (diff) | |
download | chromium_src-46624bf3698811107781e6e6fbaf80622a3f77e8.zip chromium_src-46624bf3698811107781e6e6fbaf80622a3f77e8.tar.gz chromium_src-46624bf3698811107781e6e6fbaf80622a3f77e8.tar.bz2 |
Don't allow drop to panels (pop-ups) in ChromeOS.
BUG=chromium-os:2413
TEST=Verify fix for chromium-os:2413.
Review URL: http://codereview.chromium.org/2779004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49257 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r-- | chrome/browser/tab_contents/tab_contents.cc | 10 | ||||
-rw-r--r-- | chrome/browser/tab_contents/tab_contents.h | 3 |
2 files changed, 13 insertions, 0 deletions
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc index 15206a5..2fd0504 100644 --- a/chrome/browser/tab_contents/tab_contents.cc +++ b/chrome/browser/tab_contents/tab_contents.cc @@ -1370,6 +1370,16 @@ void TabContents::OnCloseStarted() { tab_close_start_time_ = base::TimeTicks::Now(); } +bool TabContents::ShouldAcceptDragAndDrop() const { +#if defined(OS_CHROMEOS) + // ChromeOS panels (pop-ups) do not take drag-n-drop. + // See http://crosbug.com/2413 + return delegate() && !delegate()->IsPopup(const_cast<TabContents*>(this)); +#else + return true; +#endif +} + TabContents* TabContents::CloneAndMakePhantom() { TabNavigation tab_nav; diff --git a/chrome/browser/tab_contents/tab_contents.h b/chrome/browser/tab_contents/tab_contents.h index 5d49107..42c409b 100644 --- a/chrome/browser/tab_contents/tab_contents.h +++ b/chrome/browser/tab_contents/tab_contents.h @@ -667,6 +667,9 @@ class TabContents : public PageNavigator, return language_state_; } + // Returns true if underlying TabContentsView should accept drag-n-drop. + bool ShouldAcceptDragAndDrop() const; + // Creates a duplicate of this TabContents. The returned TabContents is // configured such that the renderer has not been loaded (it'll load the first // time it is selected). |