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