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

Issue 373022: Enable and implement last 2 items in bookmark bar context menu: "Open... (Closed)

Created:
11 years, 1 month ago by John Grabowski
Modified:
9 years, 6 months ago
CC:
chromium-reviews_googlegroups.com, John Grabowski, Paweł Hajdan Jr., pam+watch_chromium.org, ben+cc_chromium.org, TVL
Visibility:
Public.

Description

Enable and implement last 2 items in bookmark bar context menu: "Open All In New Window" and "Open All In Incognito Window" (17616). Bookmark Folders have the bar context menu, not the bookmark context menu (26748). Disable bookmark manager item on bookmark contextual menus (26944). BUG=http://crbug.com/17616, http://crbug.com/26748, http://crbug.com/26944 TEST=Add some bookmarks. Make sure "Open All In New Window" and "Open All In Incognito Window" work from the bar context menu. Add a bookmark folder. Make sure the context menu of the folder is the bar conetxt menu, not the 'mark context menu. Make sure Bookmark Manager item is DISabled in both context menus. nib change: hook up actions in the "Open All Blah" items just like the normal "Open All". Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=31748

Patch Set 1 #

Total comments: 15

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+626 lines, -155 lines) Patch
M chrome/app/nibs/BookmarkBar.xib View 1 2 3 24 chunks +539 lines, -55 lines 0 comments Download
M chrome/browser/browser.cc View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/bookmark_bar_bridge_unittest.mm View 1 2 3 2 chunks +2 lines, -4 lines 0 comments Download
M chrome/browser/cocoa/bookmark_bar_controller.h View 1 2 3 5 chunks +4 lines, -13 lines 0 comments Download
M chrome/browser/cocoa/bookmark_bar_controller.mm View 1 2 3 10 chunks +53 lines, -26 lines 0 comments Download
M chrome/browser/cocoa/bookmark_bar_controller_unittest.mm View 1 2 3 14 chunks +25 lines, -48 lines 0 comments Download
M chrome/browser/cocoa/browser_window_controller.h View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/cocoa/browser_window_controller.mm View 1 2 3 2 chunks +1 line, -8 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
John Grabowski
11 years, 1 month ago (2009-11-07 01:24:37 UTC) #1
mrossetti
LGTM http://codereview.chromium.org/373022/diff/1/3 File chrome/browser/cocoa/bookmark_bar_controller.mm (right): http://codereview.chromium.org/373022/diff/1/3#newcode565 Line 565: BookmarkNode* node = (BookmarkNode*)bookmarkModel_->GetBookmarkBarNode(); Can we use ...
11 years, 1 month ago (2009-11-07 02:11:45 UTC) #2
viettrungluu
http://codereview.chromium.org/373022/diff/1/3 File chrome/browser/cocoa/bookmark_bar_controller.mm (right): http://codereview.chromium.org/373022/diff/1/3#newcode314 Line 314: action == @selector(openAllBookmarksIncognitoWindow:)) && Is there a reason ...
11 years, 1 month ago (2009-11-07 02:35:02 UTC) #3
pink (ping after 24hrs)
http://codereview.chromium.org/373022/diff/1/9 File chrome/browser/browser.cc (right): http://codereview.chromium.org/373022/diff/1/9#newcode2390 Line 2390: #if !defined(OS_MACOSX) TODO? bug#? This looks intentional, when ...
11 years, 1 month ago (2009-11-11 16:40:06 UTC) #4
pink (ping after 24hrs)
http://codereview.chromium.org/373022/diff/1/9 File chrome/browser/browser.cc (right): http://codereview.chromium.org/373022/diff/1/9#newcode2390 Line 2390: #if !defined(OS_MACOSX) TODO? bug#? This looks intentional, when ...
11 years, 1 month ago (2009-11-11 16:40:29 UTC) #5
John Grabowski
http://codereview.chromium.org/373022/diff/1/9 File chrome/browser/browser.cc (right): http://codereview.chromium.org/373022/diff/1/9#newcode2390 Line 2390: #if !defined(OS_MACOSX) On 2009/11/11 16:40:06, pink wrote: > ...
11 years, 1 month ago (2009-11-12 00:24:55 UTC) #6
pink (ping after 24hrs)
Actually, the original purpose of the url delegate was such that the bookmark bar didn't ...
11 years, 1 month ago (2009-11-12 14:58:51 UTC) #7
viettrungluu
11 years, 1 month ago (2009-11-12 16:18:08 UTC) #8
http://codereview.chromium.org/373022/diff/1/3
File chrome/browser/cocoa/bookmark_bar_controller.mm (right):

http://codereview.chromium.org/373022/diff/1/3#newcode324
Line 324: BrowserList::GetLastActive()->OpenURL(url, GURL(), disposition,
On 2009/11/12 00:24:55, John Grabowski wrote:
> On 2009/11/07 02:35:02, viettrungluu wrote:
> > Are you absolutely, 110% positive that GetLastActive() will always return
the
> > right browser in this situation?
> > 
> > The advantage of the URL delegate is that this question doesn't arise; the
> > disadvantage is that it's another thing which can go stale. Might it be
better
> > to grab the BrowserWindowController through the window?
> 
> Yes.
> 
> URLDelegate can give wrong answer!  For "open all in new window", we need to
> create a new window.  In that case the urlDelegate is the OLD window.

Which shouldn't matter, or are you saying that the urlDelegate didn't properly
respect the opening disposition?

In general, I don't think the bookmark bar controller should be mucking with
browsers directly (that's the BWC's job). The reason I don't like
BrowserList::GetLastActive() is that (a) it's crazy global state, and (b) I'm
not sure what would happen if JavaScript popped up a window at an inopportune
moment.

Powered by Google App Engine
This is Rietveld 408576698