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 #ifndef CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_EDITOR_BASE_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_EDITOR_BASE_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_EDITOR_BASE_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_EDITOR_BASE_CONTROLLER_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
| 10 #include <memory> |
| 11 |
10 #include "base/mac/scoped_nsobject.h" | 12 #include "base/mac/scoped_nsobject.h" |
11 #include "base/memory/scoped_ptr.h" | |
12 #include "chrome/browser/ui/bookmarks/bookmark_editor.h" | 13 #include "chrome/browser/ui/bookmarks/bookmark_editor.h" |
13 #include "components/bookmarks/browser/bookmark_expanded_state_tracker.h" | 14 #include "components/bookmarks/browser/bookmark_expanded_state_tracker.h" |
14 | 15 |
15 class BookmarkEditorBaseControllerBridge; | 16 class BookmarkEditorBaseControllerBridge; |
16 @class BookmarkTreeBrowserCell; | 17 @class BookmarkTreeBrowserCell; |
17 | 18 |
18 namespace bookmarks { | 19 namespace bookmarks { |
19 class BookmarkModel; | 20 class BookmarkModel; |
20 } | 21 } |
21 | 22 |
(...skipping 20 matching lines...) Expand all Loading... |
42 NSString* initialName_; | 43 NSString* initialName_; |
43 NSString* displayName_; // Bound to a text field in the dialog. | 44 NSString* displayName_; // Bound to a text field in the dialog. |
44 BOOL creatingNewFolders_; // True while in createNewFolders. | 45 BOOL creatingNewFolders_; // True while in createNewFolders. |
45 // An array of BookmarkFolderInfo where each item describes a folder in the | 46 // An array of BookmarkFolderInfo where each item describes a folder in the |
46 // BookmarkNode structure. | 47 // BookmarkNode structure. |
47 base::scoped_nsobject<NSArray> folderTreeArray_; | 48 base::scoped_nsobject<NSArray> folderTreeArray_; |
48 // Bound to the table view giving a path to the current selections, of which | 49 // Bound to the table view giving a path to the current selections, of which |
49 // there should only ever be one. | 50 // there should only ever be one. |
50 base::scoped_nsobject<NSArray> tableSelectionPaths_; | 51 base::scoped_nsobject<NSArray> tableSelectionPaths_; |
51 // C++ bridge object that observes the BookmarkModel for me. | 52 // C++ bridge object that observes the BookmarkModel for me. |
52 scoped_ptr<BookmarkEditorBaseControllerBridge> observer_; | 53 std::unique_ptr<BookmarkEditorBaseControllerBridge> observer_; |
53 } | 54 } |
54 | 55 |
55 @property(nonatomic, copy) NSString* initialName; | 56 @property(nonatomic, copy) NSString* initialName; |
56 @property(nonatomic, copy) NSString* displayName; | 57 @property(nonatomic, copy) NSString* displayName; |
57 @property(nonatomic, retain, readonly) NSArray* folderTreeArray; | 58 @property(nonatomic, retain, readonly) NSArray* folderTreeArray; |
58 @property(nonatomic, copy) NSArray* tableSelectionPaths; | 59 @property(nonatomic, copy) NSArray* tableSelectionPaths; |
59 | 60 |
60 // Designated initializer. Derived classes should call through to this init. | 61 // Designated initializer. Derived classes should call through to this init. |
61 // |url| and |title| are only used for BookmarkNode::Type::NEW_URL. | 62 // |url| and |title| are only used for BookmarkNode::Type::NEW_URL. |
62 - (id)initWithParentWindow:(NSWindow*)parentWindow | 63 - (id)initWithParentWindow:(NSWindow*)parentWindow |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 | 184 |
184 // Select the given bookmark node within the tree view. | 185 // Select the given bookmark node within the tree view. |
185 - (void)selectTestNodeInBrowser:(const bookmarks::BookmarkNode*)node; | 186 - (void)selectTestNodeInBrowser:(const bookmarks::BookmarkNode*)node; |
186 | 187 |
187 // Return the dictionary for the folder selected in the tree. | 188 // Return the dictionary for the folder selected in the tree. |
188 - (BookmarkFolderInfo*)selectedFolder; | 189 - (BookmarkFolderInfo*)selectedFolder; |
189 | 190 |
190 @end | 191 @end |
191 | 192 |
192 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_EDITOR_BASE_CONTROLLER_H_ | 193 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_EDITOR_BASE_CONTROLLER_H_ |
OLD | NEW |