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_LOCATION_ICON_DECORATION_H_ | 5 #ifndef CHROME_BROWSER_COCOA_LOCATION_BAR_LOCATION_ICON_DECORATION_H_ |
6 #define CHROME_BROWSER_COCOA_LOCATION_BAR_LOCATION_ICON_DECORATION_H_ | 6 #define CHROME_BROWSER_COCOA_LOCATION_BAR_LOCATION_ICON_DECORATION_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #import <Cocoa/Cocoa.h> | 9 #import <Cocoa/Cocoa.h> |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 virtual ~LocationIconDecoration(); | 21 virtual ~LocationIconDecoration(); |
22 | 22 |
23 // Allow dragging the current URL. | 23 // Allow dragging the current URL. |
24 virtual bool IsDraggable(); | 24 virtual bool IsDraggable(); |
25 virtual NSPasteboard* GetDragPasteboard(); | 25 virtual NSPasteboard* GetDragPasteboard(); |
26 virtual NSImage* GetDragImage() { return GetImage(); } | 26 virtual NSImage* GetDragImage() { return GetImage(); } |
27 virtual NSRect GetDragImageFrame(NSRect frame) { | 27 virtual NSRect GetDragImageFrame(NSRect frame) { |
28 return GetDrawRectInFrame(frame); | 28 return GetDrawRectInFrame(frame); |
29 } | 29 } |
30 | 30 |
| 31 // Get the point where the page info bubble should point within the |
| 32 // decoration's frame, in the |owner_|'s coordinates. |
| 33 NSPoint GetBubblePointInFrame(NSRect frame); |
| 34 |
31 // Show the page info panel on click. | 35 // Show the page info panel on click. |
32 virtual bool OnMousePressed(NSRect frame); | 36 virtual bool OnMousePressed(NSRect frame); |
33 virtual bool AcceptsMousePress() { return true; } | 37 virtual bool AcceptsMousePress() { return true; } |
34 | 38 |
35 private: | 39 private: |
36 // The location bar view that owns us. | 40 // The location bar view that owns us. |
37 LocationBarViewMac* owner_; | 41 LocationBarViewMac* owner_; |
38 | 42 |
39 DISALLOW_COPY_AND_ASSIGN(LocationIconDecoration); | 43 DISALLOW_COPY_AND_ASSIGN(LocationIconDecoration); |
40 }; | 44 }; |
41 | 45 |
42 #endif // CHROME_BROWSER_COCOA_LOCATION_BAR_LOCATION_ICON_DECORATION_H_ | 46 #endif // CHROME_BROWSER_COCOA_LOCATION_BAR_LOCATION_ICON_DECORATION_H_ |
OLD | NEW |