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

Side by Side Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm

Issue 463093002: Show a separator in the combobox of Bookmark Bubble. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
« 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h" 5 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h"
6 6
7 #include "base/mac/bundle_locations.h" 7 #include "base/mac/bundle_locations.h"
8 #include "base/mac/mac_util.h" 8 #include "base/mac/mac_util.h"
9 #include "base/strings/sys_string_conversions.h" 9 #include "base/strings/sys_string_conversions.h"
10 #include "chrome/browser/bookmarks/chrome_bookmark_client.h" 10 #include "chrome/browser/bookmarks/chrome_bookmark_client.h"
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 } 325 }
326 326
327 // Fill in all information related to the folder pop up button. 327 // Fill in all information related to the folder pop up button.
328 - (void)fillInFolderList { 328 - (void)fillInFolderList {
329 [nameTextField_ setStringValue:base::SysUTF16ToNSString(node_->GetTitle())]; 329 [nameTextField_ setStringValue:base::SysUTF16ToNSString(node_->GetTitle())];
330 DCHECK([folderPopUpButton_ numberOfItems] == 0); 330 DCHECK([folderPopUpButton_ numberOfItems] == 0);
331 [self addFolderNodes:model_->root_node() 331 [self addFolderNodes:model_->root_node()
332 toPopUpButton:folderPopUpButton_ 332 toPopUpButton:folderPopUpButton_
333 indentation:0]; 333 indentation:0];
334 NSMenu* menu = [folderPopUpButton_ menu]; 334 NSMenu* menu = [folderPopUpButton_ menu];
335 [menu addItem:[NSMenuItem separatorItem]];
335 NSString* title = [[self class] chooseAnotherFolderString]; 336 NSString* title = [[self class] chooseAnotherFolderString];
336 NSMenuItem *item = [menu addItemWithTitle:title 337 NSMenuItem *item = [menu addItemWithTitle:title
337 action:NULL 338 action:NULL
338 keyEquivalent:@""]; 339 keyEquivalent:@""];
339 ChooseAnotherFolder* obj = [[self class] chooseAnotherFolderObject]; 340 ChooseAnotherFolder* obj = [[self class] chooseAnotherFolderObject];
340 [item setRepresentedObject:obj]; 341 [item setRepresentedObject:obj];
341 // Finally, select the current parent. 342 // Finally, select the current parent.
342 NSValue* parentValue = [NSValue valueWithPointer:node_->parent()]; 343 NSValue* parentValue = [NSValue valueWithPointer:node_->parent()];
343 NSInteger idx = [menu indexOfItemWithRepresentedObject:parentValue]; 344 NSInteger idx = [menu indexOfItemWithRepresentedObject:parentValue];
344 [folderPopUpButton_ selectItemAtIndex:idx]; 345 [folderPopUpButton_ selectItemAtIndex:idx];
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 NSInteger idx = [menu indexOfItemWithRepresentedObject:parentValue]; 400 NSInteger idx = [menu indexOfItemWithRepresentedObject:parentValue];
400 DCHECK(idx != -1); 401 DCHECK(idx != -1);
401 [folderPopUpButton_ selectItemAtIndex:idx]; 402 [folderPopUpButton_ selectItemAtIndex:idx];
402 } 403 }
403 404
404 - (NSPopUpButton*)folderPopUpButton { 405 - (NSPopUpButton*)folderPopUpButton {
405 return folderPopUpButton_; 406 return folderPopUpButton_;
406 } 407 }
407 408
408 @end // implementation BookmarkBubbleController(ExposedForUnitTesting) 409 @end // implementation BookmarkBubbleController(ExposedForUnitTesting)
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