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/foundation_util.h" | 12 #include "base/mac/foundation_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/bookmarks/managed_bookmark_service_factory.h" | 15 #include "chrome/browser/bookmarks/managed_bookmark_service_factory.h" |
16 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
17 #include "chrome/browser/ui/browser_dialogs.h" | 17 #include "chrome/browser/ui/browser_dialogs.h" |
18 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_all_tabs_controller.h" | 18 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_all_tabs_controller.h" |
19 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_editor_controller.h" | 19 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_editor_controller.h" |
20 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller.h" | 20 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller.h" |
21 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_tree_browser_cell.h" | 21 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_tree_browser_cell.h" |
22 #import "chrome/browser/ui/cocoa/browser_window_controller.h" | 22 #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
23 #include "chrome/grit/generated_resources.h" | 23 #include "chrome/grit/generated_resources.h" |
24 #include "components/bookmarks/browser/bookmark_model.h" | 24 #include "components/bookmarks/browser/bookmark_model.h" |
25 #include "components/bookmarks/managed/managed_bookmark_service.h" | 25 #include "components/bookmarks/managed/managed_bookmark_service.h" |
26 #include "grit/components_strings.h" | 26 #include "components/strings/grit/components_strings.h" |
27 #include "ui/base/l10n/l10n_util.h" | 27 #include "ui/base/l10n/l10n_util.h" |
28 #include "ui/base/l10n/l10n_util_mac.h" | 28 #include "ui/base/l10n/l10n_util_mac.h" |
29 | 29 |
30 using bookmarks::BookmarkExpandedStateTracker; | 30 using bookmarks::BookmarkExpandedStateTracker; |
31 using bookmarks::BookmarkModel; | 31 using bookmarks::BookmarkModel; |
32 using bookmarks::BookmarkNode; | 32 using bookmarks::BookmarkNode; |
33 | 33 |
34 @interface BookmarkEditorBaseController () | 34 @interface BookmarkEditorBaseController () |
35 | 35 |
36 // Return the folder tree object for the given path. | 36 // Return the folder tree object for the given path. |
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
729 [super dealloc]; | 729 [super dealloc]; |
730 } | 730 } |
731 | 731 |
732 // Implementing isEqual: allows the NSTreeController to preserve the selection | 732 // Implementing isEqual: allows the NSTreeController to preserve the selection |
733 // and open/shut state of outline items when the data changes. | 733 // and open/shut state of outline items when the data changes. |
734 - (BOOL)isEqual:(id)other { | 734 - (BOOL)isEqual:(id)other { |
735 return [other isKindOfClass:[BookmarkFolderInfo class]] && | 735 return [other isKindOfClass:[BookmarkFolderInfo class]] && |
736 folderNode_ == [(BookmarkFolderInfo*)other folderNode]; | 736 folderNode_ == [(BookmarkFolderInfo*)other folderNode]; |
737 } | 737 } |
738 @end | 738 @end |
OLD | NEW |