diff options
author | idanan@chromium.org <idanan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-18 17:17:25 +0000 |
---|---|---|
committer | idanan@chromium.org <idanan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-18 17:17:25 +0000 |
commit | d54f6a00bbad514c09793c219ec2e5f3819c1f08 (patch) | |
tree | 6976bfd75efc469ed23a4c671417cd9a5e5ef3fa /chrome | |
parent | a9314719f6b8972567cbb90a9ad296178a361f24 (diff) | |
download | chromium_src-d54f6a00bbad514c09793c219ec2e5f3819c1f08.zip chromium_src-d54f6a00bbad514c09793c219ec2e5f3819c1f08.tar.gz chromium_src-d54f6a00bbad514c09793c219ec2e5f3819c1f08.tar.bz2 |
Fix dragging a Chrome window which has a single tab by the tab itself.
A change in 9953 made a tab of a single chrome-window with a single tab part of the
client area so that double-clicks on it are not treated as non-client double-clicks
and that the tab context-menu appears instead of the system context menu (see issue
3787). That change also solved issue 2827 (which is not restructed to the close
button of the right-most tab).
Change 10929 reverted 9953 partially, keeping the sinle-tab of a single-window as
part of the client area but removed the double-click swallowing code that was needed
to fix 2827. In doing so, dragging a single-tabbed single chrome window by the tab
(not the tabstrip) no longer worked. This small changes only fixes that behavior. It
turns out that there was a use case where some users want double-clicks to be considered
as two single-clicks (see issue 8287) and swallowing the double-click breaks this.
Review URL: http://codereview.chromium.org/46033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11973 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/browser.cc | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index e582f8f..9e7853b 100644 --- a/chrome/browser/browser.cc +++ b/chrome/browser/browser.cc @@ -1308,13 +1308,7 @@ void Browser::CreateNewStripWithContents(TabContents* detached_contents, } int Browser::GetDragActions() const { - int result = 0; - if (BrowserList::GetBrowserCountForType(profile_, TYPE_NORMAL) > 1 || - tab_count() > 1) - result |= TAB_TEAROFF_ACTION; - if (tab_count() > 1) - result |= TAB_MOVE_ACTION; - return result; + return TAB_TEAROFF_ACTION | (tab_count() > 1 ? TAB_MOVE_ACTION : 0); } TabContents* Browser::CreateTabContentsForURL( |