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_COCOA_LOCATION_BAR_PAGE_ACTION_DECORATION_H_ | 5 #ifndef CHROME_BROWSER_COCOA_LOCATION_BAR_PAGE_ACTION_DECORATION_H_ |
6 #define CHROME_BROWSER_COCOA_LOCATION_BAR_PAGE_ACTION_DECORATION_H_ | 6 #define CHROME_BROWSER_COCOA_LOCATION_BAR_PAGE_ACTION_DECORATION_H_ |
7 | 7 |
8 #import "chrome/browser/cocoa/location_bar/image_decoration.h" | 8 #import "chrome/browser/cocoa/location_bar/image_decoration.h" |
9 | 9 |
10 #include "chrome/browser/extensions/image_loading_tracker.h" | 10 #include "chrome/browser/extensions/image_loading_tracker.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 // Sets the tooltip for this Page Action image. | 44 // Sets the tooltip for this Page Action image. |
45 void SetToolTip(NSString* tooltip); | 45 void SetToolTip(NSString* tooltip); |
46 void SetToolTip(std::string tooltip); | 46 void SetToolTip(std::string tooltip); |
47 | 47 |
48 // Get the point where extension info bubbles should point within | 48 // Get the point where extension info bubbles should point within |
49 // the given decoration frame. | 49 // the given decoration frame. |
50 NSPoint GetBubblePointInFrame(NSRect frame); | 50 NSPoint GetBubblePointInFrame(NSRect frame); |
51 | 51 |
52 // Overridden from |LocationBarDecoration| | 52 // Overridden from |LocationBarDecoration| |
| 53 virtual bool AcceptsMousePress() { return true; } |
53 virtual bool OnMousePressed(NSRect frame); | 54 virtual bool OnMousePressed(NSRect frame); |
54 virtual NSString* GetToolTip(); | 55 virtual NSString* GetToolTip(); |
55 virtual NSMenu* GetMenu(); | 56 virtual NSMenu* GetMenu(); |
56 | 57 |
57 protected: | 58 protected: |
58 // For unit testing only. | 59 // For unit testing only. |
59 PageActionDecoration() : owner_(NULL), | 60 PageActionDecoration() : owner_(NULL), |
60 profile_(NULL), | 61 profile_(NULL), |
61 page_action_(NULL), | 62 page_action_(NULL), |
62 tracker_(this), | 63 tracker_(this), |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 bool preview_enabled_; | 105 bool preview_enabled_; |
105 | 106 |
106 // Used to register for notifications received by | 107 // Used to register for notifications received by |
107 // NotificationObserver. | 108 // NotificationObserver. |
108 NotificationRegistrar registrar_; | 109 NotificationRegistrar registrar_; |
109 | 110 |
110 DISALLOW_COPY_AND_ASSIGN(PageActionDecoration); | 111 DISALLOW_COPY_AND_ASSIGN(PageActionDecoration); |
111 }; | 112 }; |
112 | 113 |
113 #endif // CHROME_BROWSER_COCOA_LOCATION_BAR_PAGE_ACTION_DECORATION_H_ | 114 #endif // CHROME_BROWSER_COCOA_LOCATION_BAR_PAGE_ACTION_DECORATION_H_ |
OLD | NEW |