OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_ |
6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/scoped_ptr.h" | 12 #include "base/scoped_ptr.h" |
13 #include "base/scoped_nsobject.h" | 13 #include "base/scoped_nsobject.h" |
14 #include "chrome/browser/cocoa/base_view.h" | 14 #include "chrome/browser/cocoa/base_view.h" |
15 #include "chrome/browser/tab_contents/tab_contents_view.h" | 15 #include "chrome/browser/tab_contents/tab_contents_view.h" |
16 #include "chrome/common/notification_registrar.h" | 16 #include "chrome/common/notification_registrar.h" |
17 #include "gfx/size.h" | 17 #include "gfx/size.h" |
18 | 18 |
19 class FilePath; | 19 class FilePath; |
20 class FindBarMac; | 20 class FindBarMac; |
21 @class FocusTracker; | 21 @class FocusTracker; |
22 @class SadTabController; | 22 @class SadTabController; |
| 23 class SkBitmap; |
23 class TabContentsViewMac; | 24 class TabContentsViewMac; |
24 @class WebDragSource; | 25 @class WebDragSource; |
25 @class WebDropTarget; | 26 @class WebDropTarget; |
| 27 namespace gfx { |
| 28 class Point; |
| 29 } |
26 | 30 |
27 @interface TabContentsViewCocoa : BaseView { | 31 @interface TabContentsViewCocoa : BaseView { |
28 @private | 32 @private |
29 TabContentsViewMac* tabContentsView_; // WEAK; owns us | 33 TabContentsViewMac* tabContentsView_; // WEAK; owns us |
30 scoped_nsobject<WebDragSource> dragSource_; | 34 scoped_nsobject<WebDragSource> dragSource_; |
31 scoped_nsobject<WebDropTarget> dropTarget_; | 35 scoped_nsobject<WebDropTarget> dropTarget_; |
32 } | 36 } |
33 | 37 |
34 // Expose this, since sometimes one needs both the NSView and the TabContents. | 38 // Expose this, since sometimes one needs both the NSView and the TabContents. |
35 - (TabContents*)tabContents; | 39 - (TabContents*)tabContents; |
(...skipping 30 matching lines...) Expand all Loading... |
66 virtual RenderWidgetHostView* CreateNewWidgetInternal(int route_id, | 70 virtual RenderWidgetHostView* CreateNewWidgetInternal(int route_id, |
67 bool activatable); | 71 bool activatable); |
68 virtual void ShowCreatedWidgetInternal(RenderWidgetHostView* widget_host_view, | 72 virtual void ShowCreatedWidgetInternal(RenderWidgetHostView* widget_host_view, |
69 const gfx::Rect& initial_pos); | 73 const gfx::Rect& initial_pos); |
70 virtual bool IsEventTracking() const; | 74 virtual bool IsEventTracking() const; |
71 virtual void CloseTabAfterEventTracking(); | 75 virtual void CloseTabAfterEventTracking(); |
72 | 76 |
73 // Backend implementation of RenderViewHostDelegate::View. | 77 // Backend implementation of RenderViewHostDelegate::View. |
74 virtual void ShowContextMenu(const ContextMenuParams& params); | 78 virtual void ShowContextMenu(const ContextMenuParams& params); |
75 virtual void StartDragging(const WebDropData& drop_data, | 79 virtual void StartDragging(const WebDropData& drop_data, |
76 WebKit::WebDragOperationsMask allowed_operations); | 80 WebKit::WebDragOperationsMask allowed_operations, |
| 81 const SkBitmap& image, |
| 82 const gfx::Point& image_offset); |
77 virtual void UpdateDragCursor(WebKit::WebDragOperation operation); | 83 virtual void UpdateDragCursor(WebKit::WebDragOperation operation); |
78 virtual void GotFocus(); | 84 virtual void GotFocus(); |
79 virtual void TakeFocus(bool reverse); | 85 virtual void TakeFocus(bool reverse); |
80 | 86 |
81 // NotificationObserver implementation --------------------------------------- | 87 // NotificationObserver implementation --------------------------------------- |
82 | 88 |
83 virtual void Observe(NotificationType type, | 89 virtual void Observe(NotificationType type, |
84 const NotificationSource& source, | 90 const NotificationSource& source, |
85 const NotificationDetails& details); | 91 const NotificationDetails& details); |
86 | 92 |
(...skipping 16 matching lines...) Expand all Loading... |
103 // visible. | 109 // visible. |
104 scoped_nsobject<SadTabController> sad_tab_; | 110 scoped_nsobject<SadTabController> sad_tab_; |
105 | 111 |
106 // The page content's intrinsic width. | 112 // The page content's intrinsic width. |
107 int preferred_width_; | 113 int preferred_width_; |
108 | 114 |
109 DISALLOW_COPY_AND_ASSIGN(TabContentsViewMac); | 115 DISALLOW_COPY_AND_ASSIGN(TabContentsViewMac); |
110 }; | 116 }; |
111 | 117 |
112 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_ | 118 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_ |
OLD | NEW |