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 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
6 #import "base/cocoa_protocols_mac.h" | 6 #import "base/cocoa_protocols_mac.h" |
7 #include "base/scoped_nsobject.h" | 7 #include "base/scoped_nsobject.h" |
8 | 8 |
9 class BookmarkModel; | 9 class BookmarkModel; |
10 class BookmarkNode; | 10 class BookmarkNode; |
(...skipping 14 matching lines...) Loading... |
25 @interface BookmarkBubbleController : NSWindowController<NSWindowDelegate> { | 25 @interface BookmarkBubbleController : NSWindowController<NSWindowDelegate> { |
26 @private | 26 @private |
27 id<BookmarkBubbleControllerDelegate> delegate_; // weak like other delegates | 27 id<BookmarkBubbleControllerDelegate> delegate_; // weak like other delegates |
28 NSWindow* parentWindow_; // weak | 28 NSWindow* parentWindow_; // weak |
29 NSPoint topLeftForBubble_; | 29 NSPoint topLeftForBubble_; |
30 | 30 |
31 // Both weak; owned by the current browser's profile | 31 // Both weak; owned by the current browser's profile |
32 BookmarkModel* model_; // weak | 32 BookmarkModel* model_; // weak |
33 const BookmarkNode* node_; // weak | 33 const BookmarkNode* node_; // weak |
34 | 34 |
35 // A mapping from titles to nodes so we only have to walk this once. | 35 // A mapping from NSComboBox index to parent nodes. |
36 scoped_nsobject<NSMutableArray> titleMapping_; | 36 scoped_nsobject<NSMutableArray> parentMapping_; |
37 | 37 |
38 BOOL alreadyBookmarked_; | 38 BOOL alreadyBookmarked_; |
39 scoped_nsobject<NSString> chooseAnotherFolder_; | 39 scoped_nsobject<NSString> chooseAnotherFolder_; |
40 | 40 |
41 IBOutlet NSTextField* bigTitle_; // "Bookmark" or "Bookmark Added!" | 41 IBOutlet NSTextField* bigTitle_; // "Bookmark" or "Bookmark Added!" |
42 IBOutlet NSTextField* nameTextField_; | 42 IBOutlet NSTextField* nameTextField_; |
43 IBOutlet NSComboBox* folderComboBox_; | 43 IBOutlet NSComboBox* folderComboBox_; |
44 } | 44 } |
45 | 45 |
46 // |node| is the bookmark node we edit in this bubble. | 46 // |node| is the bookmark node we edit in this bubble. |
(...skipping 17 matching lines...) Loading... |
64 | 64 |
65 @end | 65 @end |
66 | 66 |
67 | 67 |
68 // Exposed only for unit testing. | 68 // Exposed only for unit testing. |
69 @interface BookmarkBubbleController(ExposedForUnitTesting) | 69 @interface BookmarkBubbleController(ExposedForUnitTesting) |
70 - (void)fillInFolderList; | 70 - (void)fillInFolderList; |
71 - (void)addFolderNodes:(const BookmarkNode*)parent toComboBox:(NSComboBox*)box; | 71 - (void)addFolderNodes:(const BookmarkNode*)parent toComboBox:(NSComboBox*)box; |
72 - (void)updateBookmarkNode; | 72 - (void)updateBookmarkNode; |
73 - (void)setTitle:(NSString*)title parentFolder:(NSString*)folder; | 73 - (void)setTitle:(NSString*)title parentFolder:(NSString*)folder; |
| 74 - (void)setParentFolderSelection:(const BookmarkNode*)parent; |
74 - (NSString*)chooseAnotherFolderString; | 75 - (NSString*)chooseAnotherFolderString; |
75 - (NSComboBox*)folderComboBox; | 76 - (NSComboBox*)folderComboBox; |
76 @end | 77 @end |
77 | 78 |
78 | 79 |
79 | 80 |
80 | 81 |
81 | 82 |
OLD | NEW |