OLD | NEW |
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 <AppKit/AppKit.h> | 5 #import <AppKit/AppKit.h> |
6 | 6 |
7 #include "base/strings/sys_string_conversions.h" | 7 #include "base/strings/sys_string_conversions.h" |
8 #include "chrome/app/chrome_command_ids.h" | 8 #include "chrome/app/chrome_command_ids.h" |
9 #import "chrome/browser/app_controller_mac.h" | 9 #import "chrome/browser/app_controller_mac.h" |
10 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 10 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
11 #include "chrome/browser/bookmarks/chrome_bookmark_client.h" | 11 #include "chrome/browser/bookmarks/chrome_bookmark_client.h" |
12 #include "chrome/browser/bookmarks/chrome_bookmark_client_factory.h" | 12 #include "chrome/browser/bookmarks/chrome_bookmark_client_factory.h" |
13 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 13 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/browser/profiles/profile_manager.h" | 15 #include "chrome/browser/profiles/profile_manager.h" |
16 #include "chrome/browser/ui/browser_list.h" | 16 #include "chrome/browser/ui/browser_list.h" |
17 #include "chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.h" | 17 #include "chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.h" |
18 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_menu_cocoa_controller.h" | 18 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_menu_cocoa_controller.h" |
| 19 #include "chrome/grit/generated_resources.h" |
19 #include "components/bookmarks/browser/bookmark_model.h" | 20 #include "components/bookmarks/browser/bookmark_model.h" |
20 #include "grit/generated_resources.h" | |
21 #include "grit/theme_resources.h" | 21 #include "grit/theme_resources.h" |
22 #include "ui/base/l10n/l10n_util.h" | 22 #include "ui/base/l10n/l10n_util.h" |
23 #include "ui/base/resource/resource_bundle.h" | 23 #include "ui/base/resource/resource_bundle.h" |
24 #include "ui/gfx/image/image.h" | 24 #include "ui/gfx/image/image.h" |
25 #include "ui/resources/grit/ui_resources.h" | 25 #include "ui/resources/grit/ui_resources.h" |
26 | 26 |
27 BookmarkMenuBridge::BookmarkMenuBridge(Profile* profile, NSMenu* menu) | 27 BookmarkMenuBridge::BookmarkMenuBridge(Profile* profile, NSMenu* menu) |
28 : menuIsValid_(false), | 28 : menuIsValid_(false), |
29 profile_(profile), | 29 profile_(profile), |
30 controller_([[BookmarkMenuCocoaController alloc] initWithBridge:this | 30 controller_([[BookmarkMenuCocoaController alloc] initWithBridge:this |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 | 350 |
351 NSMenuItem* BookmarkMenuBridge::MenuItemForNode(const BookmarkNode* node) { | 351 NSMenuItem* BookmarkMenuBridge::MenuItemForNode(const BookmarkNode* node) { |
352 if (!node) | 352 if (!node) |
353 return nil; | 353 return nil; |
354 std::map<const BookmarkNode*, NSMenuItem*>::iterator it = | 354 std::map<const BookmarkNode*, NSMenuItem*>::iterator it = |
355 bookmark_nodes_.find(node); | 355 bookmark_nodes_.find(node); |
356 if (it == bookmark_nodes_.end()) | 356 if (it == bookmark_nodes_.end()) |
357 return nil; | 357 return nil; |
358 return it->second; | 358 return it->second; |
359 } | 359 } |
OLD | NEW |