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 #include <stack> | 5 #include <stack> |
6 | 6 |
7 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller.h" | 7 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller.h" |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/mac/bundle_locations.h" | 11 #include "base/mac/bundle_locations.h" |
12 #include "base/mac/mac_util.h" | 12 #include "base/mac/mac_util.h" |
13 #include "base/strings/sys_string_conversions.h" | 13 #include "base/strings/sys_string_conversions.h" |
14 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 14 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
16 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_all_tabs_controller.h" | 16 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_all_tabs_controller.h" |
17 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_editor_controller.h" | 17 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_editor_controller.h" |
18 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller.h" | 18 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller.h" |
19 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_tree_browser_cell.h" | 19 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_tree_browser_cell.h" |
20 #import "chrome/browser/ui/cocoa/browser_window_controller.h" | 20 #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
21 #include "components/bookmarks/core/browser/bookmark_model.h" | 21 #include "components/bookmarks/browser/bookmark_model.h" |
22 #include "grit/generated_resources.h" | 22 #include "grit/generated_resources.h" |
23 #include "ui/base/l10n/l10n_util.h" | 23 #include "ui/base/l10n/l10n_util.h" |
24 #include "ui/base/l10n/l10n_util_mac.h" | 24 #include "ui/base/l10n/l10n_util_mac.h" |
25 | 25 |
26 @interface BookmarkEditorBaseController () | 26 @interface BookmarkEditorBaseController () |
27 | 27 |
28 // Return the folder tree object for the given path. | 28 // Return the folder tree object for the given path. |
29 - (BookmarkFolderInfo*)folderForIndexPath:(NSIndexPath*)path; | 29 - (BookmarkFolderInfo*)folderForIndexPath:(NSIndexPath*)path; |
30 | 30 |
31 // (Re)build the folder tree from the BookmarkModel's current state. | 31 // (Re)build the folder tree from the BookmarkModel's current state. |
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
709 } | 709 } |
710 | 710 |
711 // Implementing isEqual: allows the NSTreeController to preserve the selection | 711 // Implementing isEqual: allows the NSTreeController to preserve the selection |
712 // and open/shut state of outline items when the data changes. | 712 // and open/shut state of outline items when the data changes. |
713 - (BOOL)isEqual:(id)other { | 713 - (BOOL)isEqual:(id)other { |
714 return [other isKindOfClass:[BookmarkFolderInfo class]] && | 714 return [other isKindOfClass:[BookmarkFolderInfo class]] && |
715 folderNode_ == [(BookmarkFolderInfo*)other folderNode]; | 715 folderNode_ == [(BookmarkFolderInfo*)other folderNode]; |
716 } | 716 } |
717 | 717 |
718 @end | 718 @end |
OLD | NEW |