Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Side by Side Diff: chrome/browser/cocoa/tab_view.mm

Issue 49042: Remove obsolete TODOs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/cocoa/tab_view.h" 5 #include "chrome/browser/cocoa/tab_view.h"
6 6
7 #include "chrome/browser/cocoa/tab_window_controller.h" 7 #include "chrome/browser/cocoa/tab_window_controller.h"
8 8
9 @implementation TabView 9 @implementation TabView
10 10
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 } 122 }
123 123
124 NSEventType type = [theEvent type]; 124 NSEventType type = [theEvent type];
125 if (type == NSLeftMouseDragged) { 125 if (type == NSLeftMouseDragged) {
126 moved = YES; 126 moved = YES;
127 if (!draggedController) { 127 if (!draggedController) {
128 if (isLastRemainingTab) { 128 if (isLastRemainingTab) {
129 draggedController = sourceController; 129 draggedController = sourceController;
130 dragWindow = [draggedController window]; 130 dragWindow = [draggedController window];
131 } else { 131 } else {
132 // Detach from the current window. 132 // Detach from the current window and put it in a new window.
133 // TODO(pinkerton): Create a new window, probably with
134 // Browser::CreateNewStripWithContents(), but that requires that
135 // we make some changes to return the new Browser object.
136 draggedController = [sourceController detachTabToNewWindow:self]; 133 draggedController = [sourceController detachTabToNewWindow:self];
137 dragWindow = [draggedController window]; 134 dragWindow = [draggedController window];
138
139 // TODO(pinkerton): reconcile how the view moves from one window
140 // to the other with the TabStrip model wanting to create the tabs.
141 // [[sourceController tabController] removeTab:tab_];
142 // [[sourceController tabController] addTab:tab_];
143 [dragWindow setAlphaValue:0.0]; 135 [dragWindow setAlphaValue:0.0];
144 } 136 }
145 137
146 // Bring the target window to the front and make sure it has a border. 138 // Bring the target window to the front and make sure it has a border.
147 [dragWindow setLevel:NSFloatingWindowLevel]; 139 [dragWindow setLevel:NSFloatingWindowLevel];
148 [dragWindow orderFront:nil]; 140 [dragWindow orderFront:nil];
149 [dragWindow makeMainWindow]; 141 [dragWindow makeMainWindow];
150 [draggedController showOverlay]; 142 [draggedController showOverlay];
151 dragOverlay = [draggedController overlayWindow]; 143 dragOverlay = [draggedController overlayWindow];
152 144
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 [dragWindow makeKeyAndOrderFront:nil]; 222 [dragWindow makeKeyAndOrderFront:nil];
231 223
232 [[draggedController window] setLevel:NSNormalWindowLevel]; 224 [[draggedController window] setLevel:NSNormalWindowLevel];
233 [draggedController arrangeTabs]; 225 [draggedController arrangeTabs];
234 } 226 }
235 [sourceController arrangeTabs]; 227 [sourceController arrangeTabs];
236 } 228 }
237 } 229 }
238 230
239 @end 231 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698