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

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

Issue 8603006: Add OVERRIDE to chrome/browser/ui/cocoa/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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) 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 #pragma once 7 #pragma once
8 8
9 #import <Cocoa/Cocoa.h> 9 #import <Cocoa/Cocoa.h>
10 10
11 #include "chrome/browser/ui/cocoa/location_bar/image_decoration.h" 11 #include "chrome/browser/ui/cocoa/location_bar/image_decoration.h"
12 12
13 class CommandUpdater; 13 class CommandUpdater;
14 14
15 // Star icon on the right side of the field. 15 // Star icon on the right side of the field.
16 16
17 class StarDecoration : public ImageDecoration { 17 class StarDecoration : public ImageDecoration {
18 public: 18 public:
19 explicit StarDecoration(CommandUpdater* command_updater); 19 explicit StarDecoration(CommandUpdater* command_updater);
20 virtual ~StarDecoration(); 20 virtual ~StarDecoration();
21 21
22 // Sets the image and tooltip based on |starred|. 22 // Sets the image and tooltip based on |starred|.
23 void SetStarred(bool starred); 23 void SetStarred(bool starred);
24 24
25 // Get the point where the bookmark bubble should point within the 25 // Get the point where the bookmark bubble should point within the
26 // decoration's frame. 26 // decoration's frame.
27 NSPoint GetBubblePointInFrame(NSRect frame); 27 NSPoint GetBubblePointInFrame(NSRect frame);
28 28
29 // Implement |LocationBarDecoration|. 29 // Implement |LocationBarDecoration|.
30 virtual bool AcceptsMousePress(); 30 virtual bool AcceptsMousePress() OVERRIDE;
31 virtual bool OnMousePressed(NSRect frame); 31 virtual bool OnMousePressed(NSRect frame) OVERRIDE;
32 virtual NSString* GetToolTip(); 32 virtual NSString* GetToolTip() OVERRIDE;
33 33
34 private: 34 private:
35 // For bringing up bookmark bar. 35 // For bringing up bookmark bar.
36 CommandUpdater* command_updater_; // Weak, owned by Browser. 36 CommandUpdater* command_updater_; // Weak, owned by Browser.
37 37
38 // The string to show for a tooltip. 38 // The string to show for a tooltip.
39 scoped_nsobject<NSString> tooltip_; 39 scoped_nsobject<NSString> tooltip_;
40 40
41 DISALLOW_COPY_AND_ASSIGN(StarDecoration); 41 DISALLOW_COPY_AND_ASSIGN(StarDecoration);
42 }; 42 };
43 43
44 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_STAR_DECORATION_H_ 44 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_STAR_DECORATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698