diff options
author | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-12 17:15:40 +0000 |
---|---|---|
committer | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-12 17:15:40 +0000 |
commit | 704521cc761b19c1d4d7f48643709ee8aeabf6f3 (patch) | |
tree | 792a97cce99055a3c41f0ad972df78082d7c197a /chrome/browser/cocoa/tab_view.mm | |
parent | f864cb8ebd4a188bbcaa7e9a6f2b28b1a2a94a57 (diff) | |
download | chromium_src-704521cc761b19c1d4d7f48643709ee8aeabf6f3.zip chromium_src-704521cc761b19c1d4d7f48643709ee8aeabf6f3.tar.gz chromium_src-704521cc761b19c1d4d7f48643709ee8aeabf6f3.tar.bz2 |
Fix for delegate ordering problem dragging tabs between windows. We now remove the delegate and re-instate the new one in the correct order. Clean up the API a little as well. BUG=11466. TEST=dragging a tab into an existing window then switching tabs back and forth in the destination window.
Review URL: http://codereview.chromium.org/115240
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15864 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/tab_view.mm')
-rw-r--r-- | chrome/browser/cocoa/tab_view.mm | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/chrome/browser/cocoa/tab_view.mm b/chrome/browser/cocoa/tab_view.mm index c8ce90d..8566eac 100644 --- a/chrome/browser/cocoa/tab_view.mm +++ b/chrome/browser/cocoa/tab_view.mm @@ -271,15 +271,10 @@ // into any existing window. TabWindowController* dropController = targetController; if (dropController) { - // The ordering here is important. We need to be able to get from the - // TabView in the |draggedController| to whatever is needed by the tab - // model. To do so, it still has to be in the model, so we have to call - // "drop" before we call "detach". NSView* draggedTabView = [draggedController selectedTabView]; [draggedController removeOverlay]; - [dropController dropTabView:draggedTabView + [dropController moveTabView:draggedTabView fromController:draggedController]; - [draggedController detachTabView:draggedTabView]; [dropController showWindow:nil]; } else { [targetController removePlaceholder]; @@ -301,7 +296,7 @@ if (wasDrag) { // Move tab to new location. TabWindowController* dropController = sourceController; - [dropController dropTabView:[dropController selectedTabView] + [dropController moveTabView:[dropController selectedTabView] fromController:nil]; } } |