Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Side by Side Diff: chrome/browser/cocoa/bookmark_name_folder_controller.h

Issue 345045: Bookmark context menu "Edit" starts with current name, not "New Folder".... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 create a new folder or
15 // renaming an existing folder. Accessible from a context menu on a 15 // rename 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 IBOutlet NSButton* okButton_; 20 IBOutlet NSButton* okButton_;
21 21
22 NSWindow* parentWindow_; // weak 22 NSWindow* parentWindow_; // weak
23 Profile* profile_; // weak 23 Profile* profile_; // weak
24 const BookmarkNode* node_; // weak; owned by the model 24 const BookmarkNode* node_; // weak; owned by the model
25 scoped_nsobject<NSString> initialName_; 25 scoped_nsobject<NSString> initialName_;
26 } 26 }
27 // If |node| is NULL, this is an "add folder" request.
28 // Else it is a "rename an existing folder" request.
27 - (id)initWithParentWindow:(NSWindow*)window 29 - (id)initWithParentWindow:(NSWindow*)window
28 profile:(Profile*)profile 30 profile:(Profile*)profile
29 node:(const BookmarkNode*)node; 31 node:(const BookmarkNode*)node;
30 - (void)runAsModalSheet; 32 - (void)runAsModalSheet;
31 - (IBAction)cancel:(id)sender; 33 - (IBAction)cancel:(id)sender;
32 - (IBAction)ok:(id)sender; 34 - (IBAction)ok:(id)sender;
33 @end 35 @end
34 36
35 @interface BookmarkNameFolderController(TestingAPI) 37 @interface BookmarkNameFolderController(TestingAPI)
38 - (NSString*)folderName;
36 - (void)setFolderName:(NSString*)name; 39 - (void)setFolderName:(NSString*)name;
37 - (NSButton*)okButton; 40 - (NSButton*)okButton;
38 @end 41 @end
39 42
40 #endif /* CHROME_BROWSER_COCOA_BOOKMARK_NAME_FOLDER_CONTROLLER_H_ */ 43 #endif /* CHROME_BROWSER_COCOA_BOOKMARK_NAME_FOLDER_CONTROLLER_H_ */
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/bookmark_bar_controller.mm ('k') | chrome/browser/cocoa/bookmark_name_folder_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698