| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_VIEWS_TAB_CONTENTS_TAB_CONTENTS_VIEW_WIN_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_TAB_CONTENTS_TAB_CONTENTS_VIEW_WIN_H_ |
| 6 #define CHROME_BROWSER_VIEWS_TAB_CONTENTS_TAB_CONTENTS_VIEW_WIN_H_ | 6 #define CHROME_BROWSER_VIEWS_TAB_CONTENTS_TAB_CONTENTS_VIEW_WIN_H_ |
| 7 | 7 |
| 8 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
| 9 #include "base/timer.h" | 9 #include "base/timer.h" |
| 10 #include "chrome/browser/tab_contents/tab_contents_view.h" | 10 #include "chrome/browser/tab_contents/tab_contents_view.h" |
| 11 #include "gfx/size.h" | 11 #include "gfx/size.h" |
| 12 #include "views/widget/widget_win.h" | 12 #include "views/widget/widget_win.h" |
| 13 | 13 |
| 14 class RenderViewContextMenuWin; | 14 class RenderViewContextMenuWin; |
| 15 class SadTabView; | 15 class SadTabView; |
| 16 class SkBitmap; |
| 16 class TabContentsDragWin; | 17 class TabContentsDragWin; |
| 17 struct WebDropData; | 18 struct WebDropData; |
| 18 class WebDragSource; | 19 class WebDragSource; |
| 19 class WebDropTarget; | 20 class WebDropTarget; |
| 21 namespace gfx { |
| 22 class Point; |
| 23 } |
| 20 | 24 |
| 21 // Windows-specific implementation of the TabContentsView. It is a HWND that | 25 // Windows-specific implementation of the TabContentsView. It is a HWND that |
| 22 // contains all of the contents of the tab and associated child views. | 26 // contains all of the contents of the tab and associated child views. |
| 23 class TabContentsViewWin : public TabContentsView, | 27 class TabContentsViewWin : public TabContentsView, |
| 24 public views::WidgetWin { | 28 public views::WidgetWin { |
| 25 public: | 29 public: |
| 26 // The corresponding TabContents is passed in the constructor, and manages our | 30 // The corresponding TabContents is passed in the constructor, and manages our |
| 27 // lifetime. This doesn't need to be the case, but is this way currently | 31 // lifetime. This doesn't need to be the case, but is this way currently |
| 28 // because that's what was easiest when they were split. | 32 // because that's what was easiest when they were split. |
| 29 explicit TabContentsViewWin(TabContents* tab_contents); | 33 explicit TabContentsViewWin(TabContents* tab_contents); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 48 virtual void Focus(); | 52 virtual void Focus(); |
| 49 virtual void SetInitialFocus(); | 53 virtual void SetInitialFocus(); |
| 50 virtual void StoreFocus(); | 54 virtual void StoreFocus(); |
| 51 virtual void RestoreFocus(); | 55 virtual void RestoreFocus(); |
| 52 virtual bool IsDoingDrag() const; | 56 virtual bool IsDoingDrag() const; |
| 53 virtual void CancelDragAndCloseTab(); | 57 virtual void CancelDragAndCloseTab(); |
| 54 | 58 |
| 55 // Backend implementation of RenderViewHostDelegate::View. | 59 // Backend implementation of RenderViewHostDelegate::View. |
| 56 virtual void ShowContextMenu(const ContextMenuParams& params); | 60 virtual void ShowContextMenu(const ContextMenuParams& params); |
| 57 virtual void StartDragging(const WebDropData& drop_data, | 61 virtual void StartDragging(const WebDropData& drop_data, |
| 58 WebKit::WebDragOperationsMask operations); | 62 WebKit::WebDragOperationsMask operations, |
| 63 const SkBitmap& image, |
| 64 const gfx::Point& image_offset); |
| 59 virtual void UpdateDragCursor(WebKit::WebDragOperation operation); | 65 virtual void UpdateDragCursor(WebKit::WebDragOperation operation); |
| 60 virtual void GotFocus(); | 66 virtual void GotFocus(); |
| 61 virtual void TakeFocus(bool reverse); | 67 virtual void TakeFocus(bool reverse); |
| 62 | 68 |
| 63 // WidgetWin overridde. | 69 // WidgetWin overridde. |
| 64 virtual views::FocusManager* GetFocusManager(); | 70 virtual views::FocusManager* GetFocusManager(); |
| 65 | 71 |
| 66 void EndDragging(); | 72 void EndDragging(); |
| 67 | 73 |
| 68 WebDropTarget* drop_target() const { return drop_target_.get(); } | 74 WebDropTarget* drop_target() const { return drop_target_.get(); } |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 // Used to close the tab after the stack has unwound. | 136 // Used to close the tab after the stack has unwound. |
| 131 base::OneShotTimer<TabContentsViewWin> close_tab_timer_; | 137 base::OneShotTimer<TabContentsViewWin> close_tab_timer_; |
| 132 | 138 |
| 133 // Used to handle the drag-and-drop. | 139 // Used to handle the drag-and-drop. |
| 134 scoped_refptr<TabContentsDragWin> drag_handler_; | 140 scoped_refptr<TabContentsDragWin> drag_handler_; |
| 135 | 141 |
| 136 DISALLOW_COPY_AND_ASSIGN(TabContentsViewWin); | 142 DISALLOW_COPY_AND_ASSIGN(TabContentsViewWin); |
| 137 }; | 143 }; |
| 138 | 144 |
| 139 #endif // CHROME_BROWSER_VIEWS_TAB_CONTENTS_TAB_CONTENTS_VIEW_WIN_H_ | 145 #endif // CHROME_BROWSER_VIEWS_TAB_CONTENTS_TAB_CONTENTS_VIEW_WIN_H_ |
| OLD | NEW |