| 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/prefs/incognito_mode_prefs.h" | 11 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
| 12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
| 13 #include "chrome/browser/profiles/profile_manager.h" | 13 #include "chrome/browser/profiles/profile_manager.h" |
| 14 #include "chrome/browser/ui/browser_list.h" | 14 #include "chrome/browser/ui/browser_list.h" |
| 15 #include "chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.h" | 15 #include "chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.h" |
| 16 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_menu_cocoa_controller.h" | 16 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_menu_cocoa_controller.h" |
| 17 #include "components/bookmarks/core/browser/bookmark_model.h" | 17 #include "components/bookmarks/browser/bookmark_model.h" |
| 18 #include "grit/generated_resources.h" | 18 #include "grit/generated_resources.h" |
| 19 #include "grit/theme_resources.h" | 19 #include "grit/theme_resources.h" |
| 20 #include "grit/ui_resources.h" | 20 #include "grit/ui_resources.h" |
| 21 #include "ui/base/l10n/l10n_util.h" | 21 #include "ui/base/l10n/l10n_util.h" |
| 22 #include "ui/base/resource/resource_bundle.h" | 22 #include "ui/base/resource/resource_bundle.h" |
| 23 #include "ui/gfx/image/image.h" | 23 #include "ui/gfx/image/image.h" |
| 24 | 24 |
| 25 BookmarkMenuBridge::BookmarkMenuBridge(Profile* profile, NSMenu* menu) | 25 BookmarkMenuBridge::BookmarkMenuBridge(Profile* profile, NSMenu* menu) |
| 26 : menuIsValid_(false), | 26 : menuIsValid_(false), |
| 27 profile_(profile), | 27 profile_(profile), |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 | 335 |
| 336 NSMenuItem* BookmarkMenuBridge::MenuItemForNode(const BookmarkNode* node) { | 336 NSMenuItem* BookmarkMenuBridge::MenuItemForNode(const BookmarkNode* node) { |
| 337 if (!node) | 337 if (!node) |
| 338 return nil; | 338 return nil; |
| 339 std::map<const BookmarkNode*, NSMenuItem*>::iterator it = | 339 std::map<const BookmarkNode*, NSMenuItem*>::iterator it = |
| 340 bookmark_nodes_.find(node); | 340 bookmark_nodes_.find(node); |
| 341 if (it == bookmark_nodes_.end()) | 341 if (it == bookmark_nodes_.end()) |
| 342 return nil; | 342 return nil; |
| 343 return it->second; | 343 return it->second; |
| 344 } | 344 } |
| OLD | NEW |