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

Issue 155874: Implement bookmark editor (no tree yet) (Closed)

Created:
11 years, 5 months ago by John Grabowski
Modified:
9 years, 6 months ago
CC:
chromium-reviews_googlegroups.com, John Grabowski, Ben Goodger (Google), pink (ping after 24hrs)
Visibility:
Public.

Description

Implement bookmark editor. No tree display or hierarchy movement, but name/url editing works. Get to the edotir from a context menu (Edit, Add Page). Also Implement Open All Bookmarks menu item. BUG=http://crbug.com/8381, http://crbug.com/17006 TEST=Add some bookmarks. Right-click on a bookmark and pick Edit. Test editing the name and URL. Make sure you can't add a bogus URL. Right-click on a bookmark or the bar and Add Page. Fill in name and URL fields to add a new bookmark. Right-click Open All Bookmarks and make sure it hoses your machine. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=21241

Patch Set 1 #

Total comments: 18

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1191 lines, -64 lines) Patch
M chrome/app/nibs/BookmarkBar.xib View 9 chunks +42 lines, -36 lines 0 comments Download
A chrome/app/nibs/BookmarkEditor.xib View 1 chunk +624 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/bookmark_bar_controller.h View 1 2 chunks +10 lines, -3 lines 0 comments Download
M chrome/browser/cocoa/bookmark_bar_controller.mm View 6 chunks +51 lines, -3 lines 0 comments Download
M chrome/browser/cocoa/bookmark_bar_controller_unittest.mm View 8 chunks +114 lines, -21 lines 0 comments Download
A chrome/browser/cocoa/bookmark_editor_controller.h View 1 chunk +54 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/bookmark_editor_controller.mm View 1 1 chunk +186 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/bookmark_editor_controller_unittest.mm View 1 1 chunk +105 lines, -0 lines 0 comments Download
M chrome/chrome.gyp View 4 chunks +5 lines, -1 line 0 comments Download

Messages

Total messages: 4 (0 generated)
John Grabowski
Rohit: please review. tvl: please direct as appropriate for l10n issues if there are new ...
11 years, 5 months ago (2009-07-21 20:53:38 UTC) #1
TVL
just make sure the UI is as much like windows and I'll probably use it ...
11 years, 5 months ago (2009-07-21 21:22:00 UTC) #2
rohitrao (ping after 24h)
LGTM, with some nits and questions. http://codereview.chromium.org/155874/diff/1/7 File chrome/browser/cocoa/bookmark_bar_controller.h (right): http://codereview.chromium.org/155874/diff/1/7#newcode86 Line 86: // Actions ...
11 years, 5 months ago (2009-07-21 22:06:14 UTC) #3
John Grabowski
11 years, 5 months ago (2009-07-21 23:30:44 UTC) #4
Thanks Rohit.
tvl, the few strings in here are just like Windows (e.g. "OK" on the button).

http://codereview.chromium.org/155874/diff/1/7
File chrome/browser/cocoa/bookmark_bar_controller.h (right):

http://codereview.chromium.org/155874/diff/1/7#newcode86
Line 86: // Actions for manipulatying bookmarks.
On 2009/07/21 22:06:14, rohitrao wrote:
> Typo: manupulatying

fyxed

http://codereview.chromium.org/155874/diff/1/6
File chrome/browser/cocoa/bookmark_editor_controller.mm (right):

http://codereview.chromium.org/155874/diff/1/6#newcode13
Line 13: @interface BookmarkEditorController(Private)
On 2009/07/21 22:06:14, rohitrao wrote:
> This is just the popup bubble, right?  Not the full bookmark manager?

This is NOT the full manager.

There are actually 2 kinds of popups.  One is the bubble on create bookmark with
Cmd-D.  That's not this.

The other is when editing a bookmark (context menu over button --> Edit) or
adding a bookmark from a context menu over the bar or button (menu --> Add
Page).   That's what this is.

http://codereview.chromium.org/155874/diff/1/6#newcode63
Line 63: if (node_) {
On 2009/07/21 22:06:14, rohitrao wrote:
> This scares me.  I'm worried that I could add a [self view] call in early in
> init that would invoke awakeFromNib before node_ is set.

I'm not sure how I could prevent that.  Using an object from within it's init
routine, somewhat by definition, means that initialization hasn't finished.  Is
there something you can suggest?

http://codereview.chromium.org/155874/diff/1/6#newcode66
Line 66: initialUrl_.reset([[NSString stringWithUTF8String:url_string.c_str()]
retain]);
On 2009/07/21 22:06:14, rohitrao wrote:
> 80 chars.

fixed

http://codereview.chromium.org/155874/diff/1/6#newcode78
Line 78: // Remember the browser's height; we will shrink our frame by that
On 2009/07/21 22:06:14, rohitrao wrote:
> I got really confused by the use of browser and window here, until I realized
> that you're talking about an NSBrowser and the child window.  Changing
> "browser's" to "NSBrowser's" may help.

Clarified

http://codereview.chromium.org/155874/diff/1/6#newcode173
Line 173: return [nameField_ setStringValue:name];
On 2009/07/21 22:06:14, rohitrao wrote:
> No return.

removed

http://codereview.chromium.org/155874/diff/1/6#newcode177
Line 177: return [urlField_ setStringValue:name];
On 2009/07/21 22:06:14, rohitrao wrote:
> No return.

removed

http://codereview.chromium.org/155874/diff/1/5
File chrome/browser/cocoa/bookmark_editor_controller_unittest.mm (right):

http://codereview.chromium.org/155874/diff/1/5#newcode66
Line 66: const char* url_name = "http://www.zim-bop-a-doo.com/";
On 2009/07/21 22:06:14, rohitrao wrote:
> Should be "http://www.zim-bop-a-dee.com/"

Doh!  Fixed (in entire file)

http://codereview.chromium.org/155874/diff/1/5#newcode89
Line 89: [controller ok:nil];
On 2009/07/21 22:06:14, rohitrao wrote:
> Why can you continue to interact with the controller after calling ok:? 
Doesn't
> ok: autorelease the controller?

No; I never beginSheet: on this window, so endSheet: has nothing to do (and thus
didEndSheet::: never gets called to autorelease it).

Powered by Google App Engine
This is Rietveld 408576698