| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_COCOA_BOOKMARK_EDITOR_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_COCOA_BOOKMARK_EDITOR_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_COCOA_BOOKMARK_EDITOR_CONTROLLER_H_ | 6 #define CHROME_BROWSER_COCOA_BOOKMARK_EDITOR_CONTROLLER_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #import "base/cocoa_protocols_mac.h" | 10 #import "base/cocoa_protocols_mac.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 NSWindow* parentWindow_; | 28 NSWindow* parentWindow_; |
| 29 Profile* profile_; // weak | 29 Profile* profile_; // weak |
| 30 const BookmarkNode* parentNode_; // weak; owned by the model | 30 const BookmarkNode* parentNode_; // weak; owned by the model |
| 31 const BookmarkNode* node_; // weak; owned by the model | 31 const BookmarkNode* node_; // weak; owned by the model |
| 32 BookmarkEditor::Configuration configuration_; | 32 BookmarkEditor::Configuration configuration_; |
| 33 scoped_ptr<BookmarkEditor::Handler> handler_; // we take ownership | 33 scoped_ptr<BookmarkEditor::Handler> handler_; // we take ownership |
| 34 | 34 |
| 35 scoped_nsobject<NSString> initialName_; | 35 scoped_nsobject<NSString> initialName_; |
| 36 scoped_nsobject<NSString> initialUrl_; | 36 scoped_nsobject<NSString> initialUrl_; |
| 37 scoped_nsobject<BookmarkTreeBrowserCell> currentEditCell_; | |
| 38 } | 37 } |
| 39 | 38 |
| 40 - (id)initWithParentWindow:(NSWindow*)parentWindow | 39 - (id)initWithParentWindow:(NSWindow*)parentWindow |
| 41 profile:(Profile*)profile | 40 profile:(Profile*)profile |
| 42 parent:(const BookmarkNode*)parent | 41 parent:(const BookmarkNode*)parent |
| 43 node:(const BookmarkNode*)node | 42 node:(const BookmarkNode*)node |
| 44 configuration:(BookmarkEditor::Configuration)configuration | 43 configuration:(BookmarkEditor::Configuration)configuration |
| 45 handler:(BookmarkEditor::Handler*)handler; | 44 handler:(BookmarkEditor::Handler*)handler; |
| 46 | 45 |
| 47 // Run the bookmark editor as a modal sheet. Does not block. | 46 // Run the bookmark editor as a modal sheet. Does not block. |
| 48 - (void)runAsModalSheet; | 47 - (void)runAsModalSheet; |
| 49 | 48 |
| 50 // Create a new folder at the end of the selected parent folder, give it | 49 // Create a new folder at the end of the selected parent folder, give it |
| 51 // an untitled name, and put it into editing mode. | 50 // an untitled name, and put it into editing mode. |
| 52 - (IBAction)newFolder:(id)sender; | 51 - (IBAction)newFolder:(id)sender; |
| 53 | 52 |
| 54 // Actions for the buttons at the bottom of the window. | 53 // Actions for the buttons at the bottom of the window. |
| 55 - (IBAction)cancel:(id)sender; | 54 - (IBAction)cancel:(id)sender; |
| 56 - (IBAction)ok:(id)sender; | 55 - (IBAction)ok:(id)sender; |
| 57 @end | 56 @end |
| 58 | 57 |
| 59 @interface BookmarkEditorController(TestingAPI) | 58 @interface BookmarkEditorController(TestingAPI) |
| 60 @property (assign) NSString* displayName; | 59 @property (assign) NSString* displayName; |
| 61 @property (assign) NSString* displayURL; | 60 @property (assign) NSString* displayURL; |
| 62 @property (readonly) BOOL okButtonEnabled; | 61 @property (readonly) BOOL okButtonEnabled; |
| 63 - (void)selectTestNodeInBrowser:(const BookmarkNode*)node; | 62 - (void)selectTestNodeInBrowser:(const BookmarkNode*)node; |
| 64 @end | 63 @end |
| 65 | 64 |
| 66 #endif /* CHROME_BROWSER_COCOA_BOOKMARK_EDITOR_CONTROLLER_H_ */ | 65 #endif /* CHROME_BROWSER_COCOA_BOOKMARK_EDITOR_CONTROLLER_H_ */ |
| OLD | NEW |