[email protected] | 1d379a14 | 2009-07-22 18:18:56 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef CHROME_BROWSER_COCOA_BOOKMARK_NAME_FOLDER_CONTROLLER_H_ |
| 6 | #define CHROME_BROWSER_COCOA_BOOKMARK_NAME_FOLDER_CONTROLLER_H_ |
| 7 | |
| 8 | #import <Cocoa/Cocoa.h> |
| 9 | |
| 10 | #include "base/scoped_ptr.h" |
| 11 | #include "base/scoped_nsobject.h" |
| 12 | #include "chrome/browser/bookmarks/bookmark_model.h" |
| 13 | |
| 14 | // A controller for dialog to let the user creating a new folder or |
| 15 | // renaming an existing folder. Accessible from a context menu on a |
| 16 | // bookmark button or the bookmark bar. |
| 17 | @interface BookmarkNameFolderController : NSWindowController { |
| 18 | @private |
| 19 | IBOutlet NSTextField* nameField_; |
| 20 | |
| 21 | NSWindow* parentWindow_; // weak |
| 22 | Profile* profile_; // weak |
| 23 | const BookmarkNode* node_; // weak; owned by the model |
| 24 | scoped_nsobject<NSString> initialName_; |
| 25 | } |
| 26 | - (id)initWithParentWindow:(NSWindow*)window |
| 27 | profile:(Profile*)profile |
| 28 | node:(const BookmarkNode*)node; |
[email protected] | 7b2b994 | 2009-08-20 21:24:29 | [diff] [blame] | 29 | - (void)runAsModalSheet; |
[email protected] | 1d379a14 | 2009-07-22 18:18:56 | [diff] [blame] | 30 | - (IBAction)cancel:(id)sender; |
| 31 | - (IBAction)ok:(id)sender; |
| 32 | @end |
| 33 | |
| 34 | @interface BookmarkNameFolderController(TestingAPI) |
| 35 | - (void)setFolderName:(NSString*)name; |
| 36 | @end |
| 37 | |
| 38 | #endif /* CHROME_BROWSER_COCOA_BOOKMARK_NAME_FOLDER_CONTROLLER_H_ */ |