| 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; | |
| 24 class TabContentsViewMac; | 23 class TabContentsViewMac; |
| 25 @class WebDragSource; | 24 @class WebDragSource; |
| 26 @class WebDropTarget; | 25 @class WebDropTarget; |
| 27 namespace gfx { | |
| 28 class Point; | |
| 29 } | |
| 30 | 26 |
| 31 @interface TabContentsViewCocoa : BaseView { | 27 @interface TabContentsViewCocoa : BaseView { |
| 32 @private | 28 @private |
| 33 TabContentsViewMac* tabContentsView_; // WEAK; owns us | 29 TabContentsViewMac* tabContentsView_; // WEAK; owns us |
| 34 scoped_nsobject<WebDragSource> dragSource_; | 30 scoped_nsobject<WebDragSource> dragSource_; |
| 35 scoped_nsobject<WebDropTarget> dropTarget_; | 31 scoped_nsobject<WebDropTarget> dropTarget_; |
| 36 } | 32 } |
| 37 | 33 |
| 38 // Expose this, since sometimes one needs both the NSView and the TabContents. | 34 // Expose this, since sometimes one needs both the NSView and the TabContents. |
| 39 - (TabContents*)tabContents; | 35 - (TabContents*)tabContents; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 70 virtual RenderWidgetHostView* CreateNewWidgetInternal(int route_id, | 66 virtual RenderWidgetHostView* CreateNewWidgetInternal(int route_id, |
| 71 bool activatable); | 67 bool activatable); |
| 72 virtual void ShowCreatedWidgetInternal(RenderWidgetHostView* widget_host_view, | 68 virtual void ShowCreatedWidgetInternal(RenderWidgetHostView* widget_host_view, |
| 73 const gfx::Rect& initial_pos); | 69 const gfx::Rect& initial_pos); |
| 74 virtual bool IsEventTracking() const; | 70 virtual bool IsEventTracking() const; |
| 75 virtual void CloseTabAfterEventTracking(); | 71 virtual void CloseTabAfterEventTracking(); |
| 76 | 72 |
| 77 // Backend implementation of RenderViewHostDelegate::View. | 73 // Backend implementation of RenderViewHostDelegate::View. |
| 78 virtual void ShowContextMenu(const ContextMenuParams& params); | 74 virtual void ShowContextMenu(const ContextMenuParams& params); |
| 79 virtual void StartDragging(const WebDropData& drop_data, | 75 virtual void StartDragging(const WebDropData& drop_data, |
| 80 WebKit::WebDragOperationsMask allowed_operations, | 76 WebKit::WebDragOperationsMask allowed_operations); |
| 81 const SkBitmap& image, | |
| 82 const gfx::Point& image_offset); | |
| 83 virtual void UpdateDragCursor(WebKit::WebDragOperation operation); | 77 virtual void UpdateDragCursor(WebKit::WebDragOperation operation); |
| 84 virtual void GotFocus(); | 78 virtual void GotFocus(); |
| 85 virtual void TakeFocus(bool reverse); | 79 virtual void TakeFocus(bool reverse); |
| 86 | 80 |
| 87 // NotificationObserver implementation --------------------------------------- | 81 // NotificationObserver implementation --------------------------------------- |
| 88 | 82 |
| 89 virtual void Observe(NotificationType type, | 83 virtual void Observe(NotificationType type, |
| 90 const NotificationSource& source, | 84 const NotificationSource& source, |
| 91 const NotificationDetails& details); | 85 const NotificationDetails& details); |
| 92 | 86 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 109 // visible. | 103 // visible. |
| 110 scoped_nsobject<SadTabController> sad_tab_; | 104 scoped_nsobject<SadTabController> sad_tab_; |
| 111 | 105 |
| 112 // The page content's intrinsic width. | 106 // The page content's intrinsic width. |
| 113 int preferred_width_; | 107 int preferred_width_; |
| 114 | 108 |
| 115 DISALLOW_COPY_AND_ASSIGN(TabContentsViewMac); | 109 DISALLOW_COPY_AND_ASSIGN(TabContentsViewMac); |
| 116 }; | 110 }; |
| 117 | 111 |
| 118 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_ | 112 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_ |
| OLD | NEW |