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

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

Issue 14130008: Fix race condition if a pulsing bookmark button is deleted while the bookmark bubble controller is … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: less crash Created 7 years, 8 months 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/ui/cocoa/bookmarks/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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" 8 #import "chrome/browser/ui/cocoa/base_bubble_controller.h"
9 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_model_observer_for_cocoa.h" 9 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_model_observer_for_cocoa.h"
10 10
11 class BookmarkModel; 11 class BookmarkModel;
12 class BookmarkNode; 12 class BookmarkNode;
13 @class BookmarkBubbleController; 13 @class BookmarkBubbleController;
14 14
15 // Controller for the bookmark bubble. The bookmark bubble is a 15 // Controller for the bookmark bubble. The bookmark bubble is a
16 // bubble that pops up when clicking on the STAR next to the URL to 16 // bubble that pops up when clicking on the STAR next to the URL to
17 // add or remove it as a bookmark. This bubble allows for editing of 17 // add or remove it as a bookmark. This bubble allows for editing of
18 // the bookmark in various ways (name, folder, etc.) 18 // the bookmark in various ways (name, folder, etc.)
19 @interface BookmarkBubbleController : BaseBubbleController { 19 @interface BookmarkBubbleController : BaseBubbleController {
20 @private 20 @private
21 // Both weak; owned by the current browser's profile 21 // Both weak; owned by the current browser's profile.
22 BookmarkModel* model_; // weak 22 BookmarkModel* model_; // weak
23 const BookmarkNode* node_; // weak 23 const BookmarkNode* node_; // weak
24 24
25 // The bookmark node whose button we asked to pulse. 25 // The bookmark node whose button we asked to pulse.
26 const BookmarkNode* pulsingBookmarkNode_; // weak 26 const BookmarkNode* pulsingBookmarkNode_; // weak
27 27
28 BOOL alreadyBookmarked_; 28 BOOL alreadyBookmarked_;
29 29
30 // Ping me when the bookmark model changes out from under us. 30 // Ping me when the bookmark model changes out from under us.
31 scoped_ptr<BookmarkModelObserverForCocoa> bookmark_observer_; 31 scoped_ptr<BookmarkModelObserverForCocoa> bookmarkObserver_;
32 32
33 IBOutlet NSTextField* bigTitle_; // "Bookmark" or "Bookmark Added!" 33 IBOutlet NSTextField* bigTitle_; // "Bookmark" or "Bookmark Added!"
34 IBOutlet NSTextField* nameTextField_; 34 IBOutlet NSTextField* nameTextField_;
35 IBOutlet NSPopUpButton* folderPopUpButton_; 35 IBOutlet NSPopUpButton* folderPopUpButton_;
36 } 36 }
37 37
38 @property(readonly, nonatomic) const BookmarkNode* node; 38 @property(readonly, nonatomic) const BookmarkNode* node;
39 39
40 // |node| is the bookmark node we edit in this bubble. 40 // |node| is the bookmark node we edit in this bubble.
41 // |alreadyBookmarked| tells us if the node was bookmarked before the 41 // |alreadyBookmarked| tells us if the node was bookmarked before the
(...skipping 21 matching lines...) Expand all
63 // Exposed only for unit testing. 63 // Exposed only for unit testing.
64 @interface BookmarkBubbleController (ExposedForUnitTesting) 64 @interface BookmarkBubbleController (ExposedForUnitTesting)
65 - (void)addFolderNodes:(const BookmarkNode*)parent 65 - (void)addFolderNodes:(const BookmarkNode*)parent
66 toPopUpButton:(NSPopUpButton*)button 66 toPopUpButton:(NSPopUpButton*)button
67 indentation:(int)indentation; 67 indentation:(int)indentation;
68 - (void)setTitle:(NSString*)title parentFolder:(const BookmarkNode*)parent; 68 - (void)setTitle:(NSString*)title parentFolder:(const BookmarkNode*)parent;
69 - (void)setParentFolderSelection:(const BookmarkNode*)parent; 69 - (void)setParentFolderSelection:(const BookmarkNode*)parent;
70 + (NSString*)chooseAnotherFolderString; 70 + (NSString*)chooseAnotherFolderString;
71 - (NSPopUpButton*)folderPopUpButton; 71 - (NSPopUpButton*)folderPopUpButton;
72 @end 72 @end
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698