From cb514b8024f425b974c680b06dcace135b32de39 Mon Sep 17 00:00:00 2001 From: "jrg@chromium.org" Date: Thu, 23 Jul 2009 23:56:19 +0000 Subject: Added menus for bookmark bar folders. This is NOT based on the Cole prototype; it is an attempt to get something functional in the short term, and have a visual baseline before doing something new. Added folder icons for bookmark bar folder buttons. Added an "off the side" button/menu for bookmark buttons which don't fit on the bar. Updated "Add page..." item to allow creating bookmarks in the folders (if selected over a folder button). BUG=http://crbug.com/8381 TEST=Here we go: 1) Make sure bookmark bar folders have the "folder" icon. 2) Right click on a folder --> Add Page, and add a bookmark. Make sure bookmark is now in the folder, not at the top level. 3) (Oh, you just implicitly verified you can open bookmark folders!) 4) Add 5 bookmarks then shrink the window thinner so all bookmark buttons don't fit. Make sure "off the right" button gets enabled (on right side of bar) and shows bookmarks in a pop-up menu (when clicked) that don't completely fit on the bar. 5) Make it super-wide so the all fit and make sure "off the right" button is disabled. 6) Add a bunch of bookmarks to a folder; make sure they all work. 7) Add nested folders (by editing the bookmark pref file and restarting Chrome) and make sure bookmark folder buttons have nested/cascading menus. Review URL: http://codereview.chromium.org/159286 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21479 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/cocoa/bookmark_bar_view.mm | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 chrome/browser/cocoa/bookmark_bar_view.mm (limited to 'chrome/browser/cocoa/bookmark_bar_view.mm') diff --git a/chrome/browser/cocoa/bookmark_bar_view.mm b/chrome/browser/cocoa/bookmark_bar_view.mm deleted file mode 100644 index 9bdab26..0000000 --- a/chrome/browser/cocoa/bookmark_bar_view.mm +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/browser/cocoa/bookmark_bar_view.h" - -@implementation BookmarkBarView - -// Only hit in a unit test. -- (void)setContextMenu:(NSMenu*)menu { - barContextualMenu_ = menu; -} - -// Unlike controls, generic views don't have a well-defined context -// menu (e.g. responds to the "menu" selector). So we add our own. -- (NSMenu *)menuForEvent:(NSEvent *)event { - if ([event type] == NSRightMouseDown) - return barContextualMenu_; - return nil; -} - -@end -- cgit v1.1