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

Unified Diff: chrome/browser/ui/cocoa/toolbar/toolbar_button_cocoa.h

Issue 1680773006: Implement Material Design for Mac toolbar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@md_master
Patch Set: Change button hover and pressed styles. Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/toolbar/toolbar_button_cocoa.h
diff --git a/chrome/browser/ui/cocoa/toolbar/toolbar_button_cocoa.h b/chrome/browser/ui/cocoa/toolbar/toolbar_button_cocoa.h
index 2216ae8600a8ce13916b7e166756530e783ee541..73b36b7a74cbba4224a9d948724ba75a4dd6f4fc 100644
--- a/chrome/browser/ui/cocoa/toolbar/toolbar_button_cocoa.h
+++ b/chrome/browser/ui/cocoa/toolbar/toolbar_button_cocoa.h
@@ -7,9 +7,19 @@
#import <Cocoa/Cocoa.h>
-// NSButton subclass which handles middle mouse clicking.
+#import "chrome/browser/ui/cocoa/themed_window.h"
+#import "ui/gfx/color_utils.h"
+#include "ui/gfx/vector_icons_public.h"
+
+enum class ToolbarButtonImageBackgroundStyle {
+ HOVER,
+ HOVER_THEMED,
+ PRESSED,
+ PRESSED_THEMED,
+};
-@interface ToolbarButton : NSButton {
+// NSButton subclass which handles middle mouse clicking.
+@interface ToolbarButton : NSButton<ThemedWindowDrawing> {
@protected
// YES when middle mouse clicks should be handled.
BOOL handleMiddleClick_;
@@ -17,7 +27,13 @@
// Whether or not to handle the mouse middle click events.
@property(assign, nonatomic) BOOL handleMiddleClick;
-
+// Override point for subclasses to return their icon color.
+- (SkColor)iconColor:(BOOL)themeIsDark;
+// Sets images for each of the ToolbarButton's states from the specified
+// vector icon.
+- (void)setImagesFromIconId:(gfx::VectorIconId)iconId;
+// Override point for subclasses to set the button's icons.
+- (void)resetIcons;
@end
@interface ToolbarButton (ExposedForTesting)
« no previous file with comments | « chrome/browser/ui/cocoa/toolbar/reload_button_cocoa.mm ('k') | chrome/browser/ui/cocoa/toolbar/toolbar_button_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698