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

Side by Side Diff: chrome/browser/ui/cocoa/location_bar/bubble_decoration.h

Issue 6546073: More OOLing on Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Yeap Created 9 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 | Annotate | Revision Log
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/find_bar/find_bar_bridge.mm ('k') | chrome/browser/ui/cocoa/location_bar/location_bar_decoration.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698