| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_BUBBLE_DECORATION_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_LOCATION_BAR_BUBBLE_DECORATION_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_LOCATION_BAR_BUBBLE_DECORATION_H_ | 6 #define CHROME_BROWSER_UI_COCOA_LOCATION_BAR_BUBBLE_DECORATION_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #import <Cocoa/Cocoa.h> | 9 #import <Cocoa/Cocoa.h> |
| 10 | 10 |
| 11 #include "base/gtest_prod_util.h" | 11 #include "base/gtest_prod_util.h" |
| 12 #include "base/scoped_nsobject.h" | 12 #include "base/scoped_nsobject.h" |
| 13 #include "chrome/browser/ui/cocoa/location_bar/location_bar_decoration.h" | 13 #include "chrome/browser/ui/cocoa/location_bar/location_bar_decoration.h" |
| 14 | 14 |
| 15 // Draws an outlined rounded rect, with an optional image to the left | 15 // Draws an outlined rounded rect, with an optional image to the left |
| 16 // and an optional text label to the right. | 16 // and an optional text label to the right. |
| 17 | 17 |
| 18 class BubbleDecoration : public LocationBarDecoration { | 18 class BubbleDecoration : public LocationBarDecoration { |
| 19 public: | 19 public: |
| 20 // |font| will be used when drawing the label, and cannot be |nil|. | 20 // |font| will be used when drawing the label, and cannot be |nil|. |
| 21 BubbleDecoration(NSFont* font); | 21 BubbleDecoration(NSFont* font); |
| 22 ~BubbleDecoration(); | 22 virtual ~BubbleDecoration(); |
| 23 | 23 |
| 24 // Setup the drawing parameters. | 24 // Setup the drawing parameters. |
| 25 NSImage* GetImage(); | 25 NSImage* GetImage(); |
| 26 void SetImage(NSImage* image); | 26 void SetImage(NSImage* image); |
| 27 void SetLabel(NSString* label); | 27 void SetLabel(NSString* label); |
| 28 void SetColors(NSColor* border_color, | 28 void SetColors(NSColor* border_color, |
| 29 NSColor* background_color, | 29 NSColor* background_color, |
| 30 NSColor* text_color); | 30 NSColor* text_color); |
| 31 | 31 |
| 32 // Implement |LocationBarDecoration|. | 32 // Implement |LocationBarDecoration|. |
| (...skipping 25 matching lines...) Expand all Loading... |
| 58 | 58 |
| 59 // Colors used to draw the bubble, should be set by the subclass | 59 // Colors used to draw the bubble, should be set by the subclass |
| 60 // constructor. | 60 // constructor. |
| 61 scoped_nsobject<NSColor> background_color_; | 61 scoped_nsobject<NSColor> background_color_; |
| 62 scoped_nsobject<NSColor> border_color_; | 62 scoped_nsobject<NSColor> border_color_; |
| 63 | 63 |
| 64 DISALLOW_COPY_AND_ASSIGN(BubbleDecoration); | 64 DISALLOW_COPY_AND_ASSIGN(BubbleDecoration); |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_BUBBLE_DECORATION_H_ | 67 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_BUBBLE_DECORATION_H_ |
| OLD | NEW |