OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PAGE_ACTION_DECORATION_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_LOCATION_BAR_PAGE_ACTION_DECORATION_H_ |
6 #define CHROME_BROWSER_UI_COCOA_LOCATION_BAR_PAGE_ACTION_DECORATION_H_ | 6 #define CHROME_BROWSER_UI_COCOA_LOCATION_BAR_PAGE_ACTION_DECORATION_H_ |
7 | 7 |
8 #include "chrome/browser/extensions/extension_action.h" | 8 #include "chrome/browser/extensions/extension_action.h" |
9 #include "chrome/browser/extensions/extension_action_icon_factory.h" | 9 #include "chrome/browser/extensions/extension_action_icon_factory.h" |
10 #import "chrome/browser/ui/cocoa/location_bar/image_decoration.h" | 10 #import "chrome/browser/ui/cocoa/location_bar/image_decoration.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 // the given decoration frame. | 53 // the given decoration frame. |
54 NSPoint GetBubblePointInFrame(NSRect frame); | 54 NSPoint GetBubblePointInFrame(NSRect frame); |
55 | 55 |
56 // Overridden from |LocationBarDecoration| | 56 // Overridden from |LocationBarDecoration| |
57 virtual CGFloat GetWidthForSpace(CGFloat width) OVERRIDE; | 57 virtual CGFloat GetWidthForSpace(CGFloat width) OVERRIDE; |
58 virtual bool AcceptsMousePress() OVERRIDE; | 58 virtual bool AcceptsMousePress() OVERRIDE; |
59 virtual bool OnMousePressed(NSRect frame) OVERRIDE; | 59 virtual bool OnMousePressed(NSRect frame) OVERRIDE; |
60 virtual NSString* GetToolTip() OVERRIDE; | 60 virtual NSString* GetToolTip() OVERRIDE; |
61 virtual NSMenu* GetMenu() OVERRIDE; | 61 virtual NSMenu* GetMenu() OVERRIDE; |
62 | 62 |
| 63 // Activate the page action in its default frame. |
| 64 void ActivatePageAction(); |
| 65 |
63 private: | 66 private: |
64 // Activate the page action in the given |frame|. | 67 // Activate the page action in the given |frame|. |
65 bool ActivatePageAction(NSRect frame); | 68 bool ActivatePageAction(NSRect frame); |
66 | 69 |
67 // Show the popup in the frame, with the given URL. | 70 // Show the popup in the frame, with the given URL. |
68 void ShowPopup(const NSRect& frame, const GURL& popup_url); | 71 void ShowPopup(const NSRect& frame, const GURL& popup_url); |
69 | 72 |
70 // Overridden from NotificationObserver: | 73 // Overridden from NotificationObserver: |
71 virtual void Observe(int type, | 74 virtual void Observe(int type, |
72 const content::NotificationSource& source, | 75 const content::NotificationSource& source, |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 bool preview_enabled_; | 112 bool preview_enabled_; |
110 | 113 |
111 // Used to register for notifications received by | 114 // Used to register for notifications received by |
112 // NotificationObserver. | 115 // NotificationObserver. |
113 content::NotificationRegistrar registrar_; | 116 content::NotificationRegistrar registrar_; |
114 | 117 |
115 DISALLOW_COPY_AND_ASSIGN(PageActionDecoration); | 118 DISALLOW_COPY_AND_ASSIGN(PageActionDecoration); |
116 }; | 119 }; |
117 | 120 |
118 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_PAGE_ACTION_DECORATION_H_ | 121 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_PAGE_ACTION_DECORATION_H_ |
OLD | NEW |