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 CGFloat GetWidthForSpace(CGFloat width); |
53 virtual bool AcceptsMousePress() { return true; } | 54 virtual bool AcceptsMousePress() { return true; } |
54 virtual bool OnMousePressed(NSRect frame); | 55 virtual bool OnMousePressed(NSRect frame); |
55 virtual NSString* GetToolTip(); | 56 virtual NSString* GetToolTip(); |
56 virtual NSMenu* GetMenu(); | 57 virtual NSMenu* GetMenu(); |
57 | 58 |
58 protected: | 59 protected: |
59 // For unit testing only. | 60 // For unit testing only. |
60 PageActionDecoration() : owner_(NULL), | 61 PageActionDecoration() : owner_(NULL), |
61 profile_(NULL), | 62 profile_(NULL), |
62 page_action_(NULL), | 63 page_action_(NULL), |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 bool preview_enabled_; | 106 bool preview_enabled_; |
106 | 107 |
107 // Used to register for notifications received by | 108 // Used to register for notifications received by |
108 // NotificationObserver. | 109 // NotificationObserver. |
109 NotificationRegistrar registrar_; | 110 NotificationRegistrar registrar_; |
110 | 111 |
111 DISALLOW_COPY_AND_ASSIGN(PageActionDecoration); | 112 DISALLOW_COPY_AND_ASSIGN(PageActionDecoration); |
112 }; | 113 }; |
113 | 114 |
114 #endif // CHROME_BROWSER_COCOA_LOCATION_BAR_PAGE_ACTION_DECORATION_H_ | 115 #endif // CHROME_BROWSER_COCOA_LOCATION_BAR_PAGE_ACTION_DECORATION_H_ |
OLD | NEW |