OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/resource_bundle.h" | |
9 #include "app/mac/nsimage_cache.h" | 8 #include "app/mac/nsimage_cache.h" |
10 #include "base/sys_string_conversions.h" | 9 #include "base/sys_string_conversions.h" |
11 #import "chrome/browser/app_controller_mac.h" | 10 #import "chrome/browser/app_controller_mac.h" |
12 #include "chrome/browser/bookmarks/bookmark_model.h" | 11 #include "chrome/browser/bookmarks/bookmark_model.h" |
13 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
14 #include "chrome/browser/profiles/profile_manager.h" | 13 #include "chrome/browser/profiles/profile_manager.h" |
15 #include "chrome/browser/ui/browser_list.h" | 14 #include "chrome/browser/ui/browser_list.h" |
16 #include "chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.h" | 15 #include "chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.h" |
17 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_menu_cocoa_controller.h" | 16 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_menu_cocoa_controller.h" |
18 #include "grit/generated_resources.h" | 17 #include "grit/generated_resources.h" |
19 #include "grit/theme_resources.h" | 18 #include "grit/theme_resources.h" |
20 #include "skia/ext/skia_utils_mac.h" | 19 #include "skia/ext/skia_utils_mac.h" |
| 20 #include "ui/base/resource/resource_bundle.h" |
21 | 21 |
22 BookmarkMenuBridge::BookmarkMenuBridge(Profile* profile) | 22 BookmarkMenuBridge::BookmarkMenuBridge(Profile* profile) |
23 : menuIsValid_(false), | 23 : menuIsValid_(false), |
24 profile_(profile), | 24 profile_(profile), |
25 controller_([[BookmarkMenuCocoaController alloc] initWithBridge:this]) { | 25 controller_([[BookmarkMenuCocoaController alloc] initWithBridge:this]) { |
26 if (GetBookmarkModel()) | 26 if (GetBookmarkModel()) |
27 ObserveBookmarkModel(); | 27 ObserveBookmarkModel(); |
28 } | 28 } |
29 | 29 |
30 BookmarkMenuBridge::~BookmarkMenuBridge() { | 30 BookmarkMenuBridge::~BookmarkMenuBridge() { |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 | 243 |
244 NSMenuItem* BookmarkMenuBridge::MenuItemForNode(const BookmarkNode* node) { | 244 NSMenuItem* BookmarkMenuBridge::MenuItemForNode(const BookmarkNode* node) { |
245 if (!node) | 245 if (!node) |
246 return nil; | 246 return nil; |
247 std::map<const BookmarkNode*, NSMenuItem*>::iterator it = | 247 std::map<const BookmarkNode*, NSMenuItem*>::iterator it = |
248 bookmark_nodes_.find(node); | 248 bookmark_nodes_.find(node); |
249 if (it == bookmark_nodes_.end()) | 249 if (it == bookmark_nodes_.end()) |
250 return nil; | 250 return nil; |
251 return it->second; | 251 return it->second; |
252 } | 252 } |
OLD | NEW |