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

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

Issue 7810027: [Mac] Use the right string in bookmark folders to "Open All In Incognito" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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 | Annotate | Revision Log
« 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <AppKit/AppKit.h> 5 #import <AppKit/AppKit.h>
6 6
7 #include "chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.h" 7 #include "chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.h"
8 8
9 #include "base/sys_string_conversions.h" 9 #include "base/sys_string_conversions.h"
10 #include "chrome/app/chrome_command_ids.h" 10 #include "chrome/app/chrome_command_ids.h"
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 // Add menus for 'Open All Bookmarks'. 258 // Add menus for 'Open All Bookmarks'.
259 [menu addItem:[NSMenuItem separatorItem]]; 259 [menu addItem:[NSMenuItem separatorItem]];
260 bool enabled = child_count != 0; 260 bool enabled = child_count != 0;
261 AddItemToMenu(IDC_BOOKMARK_BAR_OPEN_ALL, 261 AddItemToMenu(IDC_BOOKMARK_BAR_OPEN_ALL,
262 IDS_BOOKMARK_BAR_OPEN_ALL, 262 IDS_BOOKMARK_BAR_OPEN_ALL,
263 node, menu, enabled); 263 node, menu, enabled);
264 AddItemToMenu(IDC_BOOKMARK_BAR_OPEN_ALL_NEW_WINDOW, 264 AddItemToMenu(IDC_BOOKMARK_BAR_OPEN_ALL_NEW_WINDOW,
265 IDS_BOOKMARK_BAR_OPEN_ALL_NEW_WINDOW, 265 IDS_BOOKMARK_BAR_OPEN_ALL_NEW_WINDOW,
266 node, menu, enabled); 266 node, menu, enabled);
267 AddItemToMenu(IDC_BOOKMARK_BAR_OPEN_ALL_INCOGNITO, 267 AddItemToMenu(IDC_BOOKMARK_BAR_OPEN_ALL_INCOGNITO,
268 IDS_BOOKMARK_BAR_OPEN_INCOGNITO, 268 IDS_BOOKMARK_BAR_OPEN_ALL_INCOGNITO,
269 node, menu, enabled); 269 node, menu, enabled);
270 } 270 }
271 } 271 }
272 272
273 void BookmarkMenuBridge::AddItemToMenu(int command_id, 273 void BookmarkMenuBridge::AddItemToMenu(int command_id,
274 int message_id, 274 int message_id,
275 const BookmarkNode* node, 275 const BookmarkNode* node,
276 NSMenu* menu, 276 NSMenu* menu,
277 bool enabled) { 277 bool enabled) {
278 NSString* title = l10n_util::GetNSStringWithFixup(message_id); 278 NSString* title = l10n_util::GetNSStringWithFixup(message_id);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 324
325 NSMenuItem* BookmarkMenuBridge::MenuItemForNode(const BookmarkNode* node) { 325 NSMenuItem* BookmarkMenuBridge::MenuItemForNode(const BookmarkNode* node) {
326 if (!node) 326 if (!node)
327 return nil; 327 return nil;
328 std::map<const BookmarkNode*, NSMenuItem*>::iterator it = 328 std::map<const BookmarkNode*, NSMenuItem*>::iterator it =
329 bookmark_nodes_.find(node); 329 bookmark_nodes_.find(node);
330 if (it == bookmark_nodes_.end()) 330 if (it == bookmark_nodes_.end())
331 return nil; 331 return nil;
332 return it->second; 332 return it->second;
333 } 333 }
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