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

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

Issue 900613003: Mac: Make it easier for views to correctly draw with a theme. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gyp
Patch Set: Created 5 years, 10 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include <vector> 6 #include <vector>
7 #import "chrome/browser/ui/cocoa/draggable_button.h" 7 #import "chrome/browser/ui/cocoa/draggable_button.h"
8 #import "chrome/browser/ui/cocoa/themed_window.h"
8 #include "ui/base/window_open_disposition.h" 9 #include "ui/base/window_open_disposition.h"
9 10
10 @class BookmarkBarFolderController; 11 @class BookmarkBarFolderController;
11 @class BookmarkButton; 12 @class BookmarkButton;
12 class BookmarkNode; 13 class BookmarkNode;
13 @class BrowserWindowController; 14 @class BrowserWindowController;
14 class ThemeService; 15 class ThemeService;
15 16
16 namespace bookmarks { 17 namespace bookmarks {
17 class BookmarkModel; 18 class BookmarkModel;
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 - (void)removeButton:(NSInteger)buttonIndex animate:(BOOL)poof; 183 - (void)removeButton:(NSInteger)buttonIndex animate:(BOOL)poof;
183 184
184 // Determine the controller containing the button representing |node|, if any. 185 // Determine the controller containing the button representing |node|, if any.
185 - (id<BookmarkButtonControllerProtocol>)controllerForNode: 186 - (id<BookmarkButtonControllerProtocol>)controllerForNode:
186 (const BookmarkNode*)node; 187 (const BookmarkNode*)node;
187 188
188 @end // @protocol BookmarkButtonControllerProtocol 189 @end // @protocol BookmarkButtonControllerProtocol
189 190
190 191
191 // Class for bookmark bar buttons that can be drag sources. 192 // Class for bookmark bar buttons that can be drag sources.
192 @interface BookmarkButton : DraggableButton { 193 @interface BookmarkButton : DraggableButton<ThemedWindowDrawing> {
193 @private 194 @private
194 IBOutlet NSObject<BookmarkButtonDelegate>* delegate_; // Weak. 195 IBOutlet NSObject<BookmarkButtonDelegate>* delegate_; // Weak.
195 196
196 // Saved pointer to the BWC for the browser window that contains this button. 197 // Saved pointer to the BWC for the browser window that contains this button.
197 // Used to lock and release bar visibility during a drag. The pointer is 198 // Used to lock and release bar visibility during a drag. The pointer is
198 // saved because the bookmark button is no longer a part of a window at the 199 // saved because the bookmark button is no longer a part of a window at the
199 // end of a drag operation (or, in fact, can be dragged to a completely 200 // end of a drag operation (or, in fact, can be dragged to a completely
200 // different window), so there is no way to retrieve the same BWC object after 201 // different window), so there is no way to retrieve the same BWC object after
201 // a drag. 202 // a drag.
202 BrowserWindowController* visibilityDelegate_; // weak 203 BrowserWindowController* visibilityDelegate_; // weak
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 259
259 // Key for userInfo dict of a kPulseBookmarkButtonNotification. 260 // Key for userInfo dict of a kPulseBookmarkButtonNotification.
260 // Value is a [NSValue valueWithPointer:]; pointer is a (const BookmarkNode*). 261 // Value is a [NSValue valueWithPointer:]; pointer is a (const BookmarkNode*).
261 extern NSString* const kBookmarkKey; 262 extern NSString* const kBookmarkKey;
262 263
263 // Key for userInfo dict of a kPulseBookmarkButtonNotification. 264 // Key for userInfo dict of a kPulseBookmarkButtonNotification.
264 // Value is a [NSNumber numberWithBool:] to turn pulsing on or off. 265 // Value is a [NSNumber numberWithBool:] to turn pulsing on or off.
265 extern NSString* const kBookmarkPulseFlagKey; 266 extern NSString* const kBookmarkPulseFlagKey;
266 267
267 }; 268 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698