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

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

Issue 2825048: [Mac] Allow omnibox decorations to decline mouse events. (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: Rohit's comment comment, and merge with content-setting change. Created 10 years, 5 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
« no previous file with comments | « chrome/browser/cocoa/location_bar/page_action_decoration.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_COCOA_LOCATION_BAR_STAR_DECORATION_H_ 5 #ifndef CHROME_BROWSER_COCOA_LOCATION_BAR_STAR_DECORATION_H_
6 #define CHROME_BROWSER_COCOA_LOCATION_BAR_STAR_DECORATION_H_ 6 #define CHROME_BROWSER_COCOA_LOCATION_BAR_STAR_DECORATION_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "chrome/browser/cocoa/location_bar/image_decoration.h" 10 #include "chrome/browser/cocoa/location_bar/image_decoration.h"
11 11
12 class CommandUpdater; 12 class CommandUpdater;
13 13
14 // Star icon on the right side of the field. 14 // Star icon on the right side of the field.
15 15
16 class StarDecoration : public ImageDecoration { 16 class StarDecoration : public ImageDecoration {
17 public: 17 public:
18 explicit StarDecoration(CommandUpdater* command_updater); 18 explicit StarDecoration(CommandUpdater* command_updater);
19 virtual ~StarDecoration(); 19 virtual ~StarDecoration();
20 20
21 // Sets the image and tooltip based on |starred|. 21 // Sets the image and tooltip based on |starred|.
22 void SetStarred(bool starred); 22 void SetStarred(bool starred);
23 23
24 // Get the point where the bookmark bubble should point within the 24 // Get the point where the bookmark bubble should point within the
25 // decoration's frame. 25 // decoration's frame.
26 NSPoint GetBubblePointInFrame(NSRect frame); 26 NSPoint GetBubblePointInFrame(NSRect frame);
27 27
28 // Implement |LocationBarDecoration|. 28 // Implement |LocationBarDecoration|.
29 virtual bool AcceptsMousePress() { return true; }
29 virtual bool OnMousePressed(NSRect frame); 30 virtual bool OnMousePressed(NSRect frame);
30 virtual NSString* GetToolTip(); 31 virtual NSString* GetToolTip();
31 32
32 private: 33 private:
33 // For bringing up bookmark bar. 34 // For bringing up bookmark bar.
34 CommandUpdater* command_updater_; // Weak, owned by Browser. 35 CommandUpdater* command_updater_; // Weak, owned by Browser.
35 36
36 // The string to show for a tooltip. 37 // The string to show for a tooltip.
37 scoped_nsobject<NSString> tooltip_; 38 scoped_nsobject<NSString> tooltip_;
38 39
39 DISALLOW_COPY_AND_ASSIGN(StarDecoration); 40 DISALLOW_COPY_AND_ASSIGN(StarDecoration);
40 }; 41 };
41 42
42 #endif // CHROME_BROWSER_COCOA_LOCATION_BAR_STAR_DECORATION_H_ 43 #endif // CHROME_BROWSER_COCOA_LOCATION_BAR_STAR_DECORATION_H_
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/location_bar/page_action_decoration.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698