| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_UI_COCOA_LOCATION_BAR_STAR_DECORATION_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_LOCATION_BAR_STAR_DECORATION_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_LOCATION_BAR_STAR_DECORATION_H_ | 6 #define CHROME_BROWSER_UI_COCOA_LOCATION_BAR_STAR_DECORATION_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 // Returns true if the star is lit. | 25 // Returns true if the star is lit. |
| 26 bool starred() const { return starred_; } | 26 bool starred() const { return starred_; } |
| 27 | 27 |
| 28 // Implement |LocationBarDecoration|. | 28 // Implement |LocationBarDecoration|. |
| 29 bool AcceptsMousePress() override; | 29 bool AcceptsMousePress() override; |
| 30 bool OnMousePressed(NSRect frame, NSPoint location) override; | 30 bool OnMousePressed(NSRect frame, NSPoint location) override; |
| 31 NSString* GetToolTip() override; | 31 NSString* GetToolTip() override; |
| 32 NSPoint GetBubblePointInFrame(NSRect frame) override; | 32 NSPoint GetBubblePointInFrame(NSRect frame) override; |
| 33 | 33 |
| 34 protected: |
| 35 // Overridden from LocationBarDecoration: |
| 36 SkColor GetMaterialIconColor(bool location_bar_is_dark) override; |
| 37 gfx::VectorIconId GetMaterialVectorIconId() override; |
| 38 |
| 34 private: | 39 private: |
| 35 // For bringing up bookmark bar. | 40 // For bringing up bookmark bar. |
| 36 CommandUpdater* command_updater_; // Weak, owned by Browser. | 41 CommandUpdater* command_updater_; // Weak, owned by Browser. |
| 37 | 42 |
| 38 // The string to show for a tooltip. | 43 // The string to show for a tooltip. |
| 39 base::scoped_nsobject<NSString> tooltip_; | 44 base::scoped_nsobject<NSString> tooltip_; |
| 40 | 45 |
| 41 // Whether the star icon is lit. | 46 // Whether the star icon is lit. |
| 42 bool starred_; | 47 bool starred_; |
| 43 | 48 |
| 44 DISALLOW_COPY_AND_ASSIGN(StarDecoration); | 49 DISALLOW_COPY_AND_ASSIGN(StarDecoration); |
| 45 }; | 50 }; |
| 46 | 51 |
| 47 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_STAR_DECORATION_H_ | 52 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_STAR_DECORATION_H_ |
| OLD | NEW |