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

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

Issue 391057: Fix multi-window bookmark bubble problem.... (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
« no previous file with comments | « no previous file | chrome/browser/cocoa/bookmark_bubble_controller.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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;
11 @class BookmarkBubbleController; 11 @class BookmarkBubbleController;
12 12
13 // Protocol for a BookmarkBubbleController's (BBC's) delegate. 13 // Protocol for a BookmarkBubbleController's (BBC's) delegate.
14 @protocol BookmarkBubbleControllerDelegate 14 @protocol BookmarkBubbleControllerDelegate
15 15
16 // The bubble asks the delegate to perform an edit when needed. 16 // The bubble asks the delegate to perform an edit when needed.
17 - (void)editBookmarkNode:(const BookmarkNode*)node; 17 - (void)editBookmarkNode:(const BookmarkNode*)node;
18 18
19 // The bubble tells the delegate when it will go away.
20 - (void)bubbleWindowWillClose:(NSWindow*)window;
21
19 @end 22 @end
20 23
21 // Controller for the bookmark bubble. The bookmark bubble is a 24 // Controller for the bookmark bubble. The bookmark bubble is a
22 // bubble that pops up when clicking on the STAR next to the URL to 25 // bubble that pops up when clicking on the STAR next to the URL to
23 // add or remove it as a bookmark. This bubble allows for editing of 26 // add or remove it as a bookmark. This bubble allows for editing of
24 // the bookmark in various ways (name, folder, etc.) 27 // the bookmark in various ways (name, folder, etc.)
25 @interface BookmarkBubbleController : NSWindowController<NSWindowDelegate> { 28 @interface BookmarkBubbleController : NSWindowController<NSWindowDelegate> {
26 @private 29 @private
27 id<BookmarkBubbleControllerDelegate> delegate_; // weak like other delegates 30 id<BookmarkBubbleControllerDelegate> delegate_; // weak like other delegates
28 NSWindow* parentWindow_; // weak 31 NSWindow* parentWindow_; // weak
(...skipping 22 matching lines...) Expand all
51 model:(BookmarkModel*)model 54 model:(BookmarkModel*)model
52 node:(const BookmarkNode*)node 55 node:(const BookmarkNode*)node
53 alreadyBookmarked:(BOOL)alreadyBookmarked; 56 alreadyBookmarked:(BOOL)alreadyBookmarked;
54 57
55 // Actions for buttons in the dialog. 58 // Actions for buttons in the dialog.
56 - (IBAction)edit:(id)sender; 59 - (IBAction)edit:(id)sender;
57 - (IBAction)ok:(id)sender; 60 - (IBAction)ok:(id)sender;
58 - (IBAction)remove:(id)sender; 61 - (IBAction)remove:(id)sender;
59 - (IBAction)cancel:(id)sender; 62 - (IBAction)cancel:(id)sender;
60 - (IBAction)folderChanged:(id)sender; 63 - (IBAction)folderChanged:(id)sender;
64
61 @end 65 @end
62 66
63 67
64 // Exposed only for unit testing. 68 // Exposed only for unit testing.
65 @interface BookmarkBubbleController(ExposedForUnitTesting) 69 @interface BookmarkBubbleController(ExposedForUnitTesting)
66 - (void)addFolderNodes:(const BookmarkNode*)parent 70 - (void)addFolderNodes:(const BookmarkNode*)parent
67 toPopUpButton:(NSPopUpButton*)button; 71 toPopUpButton:(NSPopUpButton*)button;
68 - (void)setTitle:(NSString*)title parentFolder:(const BookmarkNode*)parent; 72 - (void)setTitle:(NSString*)title parentFolder:(const BookmarkNode*)parent;
69 - (void)setParentFolderSelection:(const BookmarkNode*)parent; 73 - (void)setParentFolderSelection:(const BookmarkNode*)parent;
70 + (NSString*)chooseAnotherFolderString; 74 + (NSString*)chooseAnotherFolderString;
71 - (NSPopUpButton*)folderPopUpButton; 75 - (NSPopUpButton*)folderPopUpButton;
72 @end 76 @end
73 77
74 78
75 79
76 80
77 81
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/cocoa/bookmark_bubble_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698