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

Issue 337055: Mac: implement drag-and-drop of URLs to tabs/tab strip. (Closed)

Created:
11 years, 1 month ago by viettrungluu
Modified:
9 years, 6 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Mac: implement drag-and-drop of URLs to tabs/tab strip. Not yet implemented: visual feedback, dropping multiple URLs/files, perhaps key modifiers (?). Doing the visual feedback right (making the tabs move around, etc.) will require a fairly hefty work on the tabs code, so I'm splitting up the work. BUG=25405 TEST=Test dragging and dropping URLs/links, files, plain text (with a possibly-poorly-formed URL), etc. on the tab and on the empty part of the tab strip; web page should load in tab or in new tab, and that tab should be selected. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=33890

Patch Set 1 #

Patch Set 2 : Re-architected, implemented insertion between tabs, implemented arrow over the top. #

Patch Set 3 : Got rid of extraneous #import. #

Patch Set 4 : More comments, minor cleanup, tiny bugfix. #

Patch Set 5 : Didn't need the TabView to register for drops; these things pass through. #

Patch Set 6 : Oops. Forgot to change header file. #

Patch Set 7 : Merged ToT and stuff. #

Patch Set 8 : Make this patch even more minimalist. #

Patch Set 9 : Cleaned up a few things. #

Total comments: 19

Patch Set 10 : foo #

Total comments: 5

Patch Set 11 : Give Scott his lines back. #

Patch Set 12 : Give another line back. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+361 lines, -10 lines) Patch
M chrome/browser/cocoa/browser_window_controller.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +9 lines, -1 line 2 comments Download
M chrome/browser/cocoa/browser_window_controller.mm View 1 2 3 4 5 6 7 8 9 10 4 chunks +17 lines, -2 lines 0 comments Download
M chrome/browser/cocoa/tab_strip_controller.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/tab_strip_controller.mm View 1 2 3 4 5 6 7 8 9 10 8 chunks +152 lines, -7 lines 0 comments Download
M chrome/browser/cocoa/tab_strip_view.h View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/tab_strip_view.mm View 1 2 3 4 5 6 7 2 chunks +23 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/url_drop_target.h View 1 2 3 4 5 6 7 8 9 1 chunk +46 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/url_drop_target.mm View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +99 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
viettrungluu
11 years ago (2009-12-04 18:12:46 UTC) #1
Scott Hess - ex-Googler
What happens if you drop in the titlebar above the tabs? What should happen? http://codereview.chromium.org/337055/diff/8001/9004 ...
11 years ago (2009-12-04 21:45:08 UTC) #2
viettrungluu
Thanks, Scott. If you drag stuff above, then it'll be as if you were over ...
11 years ago (2009-12-04 22:30:07 UTC) #3
Scott Hess - ex-Googler
lgtm if you give back my wasted lines. http://codereview.chromium.org/337055/diff/6023/6024 File chrome/browser/cocoa/browser_window_controller.h (right): http://codereview.chromium.org/337055/diff/6023/6024#newcode191 chrome/browser/cocoa/browser_window_controller.h:191: at:(NSPoint)location; ...
11 years ago (2009-12-04 23:17:21 UTC) #4
viettrungluu
At 5 cents per wasted line, I think I could just pay the fine (can ...
11 years ago (2009-12-04 23:46:28 UTC) #5
pink (ping after 24hrs)
http://codereview.chromium.org/337055/diff/11006/11007 File chrome/browser/cocoa/browser_window_controller.h (right): http://codereview.chromium.org/337055/diff/11006/11007#newcode52 chrome/browser/cocoa/browser_window_controller.h:52: URLDropTargetWindowController> { crud, i wish i had seen this ...
11 years ago (2009-12-07 15:42:01 UTC) #6
viettrungluu
http://codereview.chromium.org/337055/diff/11006/11007 File chrome/browser/cocoa/browser_window_controller.h (right): http://codereview.chromium.org/337055/diff/11006/11007#newcode52 chrome/browser/cocoa/browser_window_controller.h:52: URLDropTargetWindowController> { On 2009/12/07 15:42:02, pink wrote: > crud, ...
11 years ago (2009-12-07 15:52:21 UTC) #7
pink (ping after 24hrs)
11 years ago (2009-12-07 15:59:33 UTC) #8
Really? It surprises me that each window doesn't have its own
responder chain. That kinda sucks.

On Mon, Dec 7, 2009 at 10:52 AM,  <viettrungluu@chromium.org> wrote:
>
> http://codereview.chromium.org/337055/diff/11006/11007
> File chrome/browser/cocoa/browser_window_controller.h (right):
>
> http://codereview.chromium.org/337055/diff/11006/11007#newcode52
> chrome/browser/cocoa/browser_window_controller.h:52:
> URLDropTargetWindowController> {
> On 2009/12/07 15:42:02, pink wrote:
>>
>> crud, i wish i had seen this before you checked it in. The way this
>
> should be
>>
>> done is not with yet another protocol, but by dispatching the call
>
> through the
>>
>> responder chain and catching it at the BWC. That'll prevent us from
>
> having to
>>
>> plumb it all the way down the line when nothing in the middle cares.
>
>> That's how I was going to do it before I got side-tracked to other
>
> things. We
>>
>> should probably do with with loading of urls clicked on the bookmark
>
> bar as well
>>
>> (it's basically the same issue).
>
> I had a previous version which passed it down the responder chain -- it
> didn't work so well, at least not without taking fairly heroic efforts.
> The problem is that you often drag to an inactive window, which isn't on
> the responder chain at all. So you'd have to catch it in the app
> controller (in addition to in the BWC, since the window *might* be
> active), which then has to figure out which window to send it to. So in
> the end the app controller would have to look up the browser window
> controller anyway.
>
> (If it's any consolation, I don't add yet another delegate to go stale;
> I just look up the controller from its window....)
>
> http://codereview.chromium.org/337055
>



-- 
Mike Pinkerton
Mac Weenie
pinkerton@google.com

Powered by Google App Engine
This is Rietveld 408576698