| 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 "base/memory/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "chrome/browser/bookmarks/bookmark_editor.h" | 12 #include "chrome/browser/bookmarks/bookmark_editor.h" |
| 13 #include "chrome/browser/bookmarks/bookmark_expanded_state_tracker.h" | 13 #include "chrome/browser/bookmarks/bookmark_expanded_state_tracker.h" |
| 14 | 14 |
| 15 class BookmarkEditorBaseControllerBridge; | 15 class BookmarkEditorBaseControllerBridge; |
| 16 class BookmarkModel; | 16 class BookmarkModel; |
| 17 @class BookmarkTreeBrowserCell; | 17 @class BookmarkTreeBrowserCell; |
| 18 | 18 |
| 19 // A base controller class for bookmark creation and editing dialogs which | 19 // A base controller class for bookmark creation and editing dialogs which |
| 20 // present the current bookmark folder structure in a tree view. Do not | 20 // present the current bookmark folder structure in a tree view. Do not |
| (...skipping 13 matching lines...) Expand all Loading... |
| 34 const BookmarkNode* parentNode_; // weak; owned by the model | 34 const BookmarkNode* parentNode_; // weak; owned by the model |
| 35 GURL url_; // This and title_ are only used for new urls. | 35 GURL url_; // This and title_ are only used for new urls. |
| 36 string16 title_; | 36 string16 title_; |
| 37 BookmarkEditor::Configuration configuration_; | 37 BookmarkEditor::Configuration configuration_; |
| 38 NSString* initialName_; | 38 NSString* initialName_; |
| 39 NSString* displayName_; // Bound to a text field in the dialog. | 39 NSString* displayName_; // Bound to a text field in the dialog. |
| 40 BOOL okEnabled_; // Bound to the OK button. | 40 BOOL okEnabled_; // Bound to the OK button. |
| 41 BOOL creatingNewFolders_; // True while in createNewFolders. | 41 BOOL creatingNewFolders_; // True while in createNewFolders. |
| 42 // An array of BookmarkFolderInfo where each item describes a folder in the | 42 // An array of BookmarkFolderInfo where each item describes a folder in the |
| 43 // BookmarkNode structure. | 43 // BookmarkNode structure. |
| 44 scoped_nsobject<NSArray> folderTreeArray_; | 44 base::scoped_nsobject<NSArray> folderTreeArray_; |
| 45 // Bound to the table view giving a path to the current selections, of which | 45 // Bound to the table view giving a path to the current selections, of which |
| 46 // there should only ever be one. | 46 // there should only ever be one. |
| 47 scoped_nsobject<NSArray> tableSelectionPaths_; | 47 base::scoped_nsobject<NSArray> tableSelectionPaths_; |
| 48 // C++ bridge object that observes the BookmarkModel for me. | 48 // C++ bridge object that observes the BookmarkModel for me. |
| 49 scoped_ptr<BookmarkEditorBaseControllerBridge> observer_; | 49 scoped_ptr<BookmarkEditorBaseControllerBridge> observer_; |
| 50 } | 50 } |
| 51 | 51 |
| 52 @property(nonatomic, copy) NSString* initialName; | 52 @property(nonatomic, copy) NSString* initialName; |
| 53 @property(nonatomic, copy) NSString* displayName; | 53 @property(nonatomic, copy) NSString* displayName; |
| 54 @property(nonatomic, assign) BOOL okEnabled; | 54 @property(nonatomic, assign) BOOL okEnabled; |
| 55 @property(nonatomic, retain, readonly) NSArray* folderTreeArray; | 55 @property(nonatomic, retain, readonly) NSArray* folderTreeArray; |
| 56 @property(nonatomic, copy) NSArray* tableSelectionPaths; | 56 @property(nonatomic, copy) NSArray* tableSelectionPaths; |
| 57 | 57 |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 | 176 |
| 177 // Select the given bookmark node within the tree view. | 177 // Select the given bookmark node within the tree view. |
| 178 - (void)selectTestNodeInBrowser:(const BookmarkNode*)node; | 178 - (void)selectTestNodeInBrowser:(const BookmarkNode*)node; |
| 179 | 179 |
| 180 // Return the dictionary for the folder selected in the tree. | 180 // Return the dictionary for the folder selected in the tree. |
| 181 - (BookmarkFolderInfo*)selectedFolder; | 181 - (BookmarkFolderInfo*)selectedFolder; |
| 182 | 182 |
| 183 @end | 183 @end |
| 184 | 184 |
| 185 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_EDITOR_BASE_CONTROLLER_H_ | 185 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_EDITOR_BASE_CONTROLLER_H_ |
| OLD | NEW |