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_VIEWS_TAB_CONTENTS_NATIVE_TAB_CONTENTS_VIEW_WIN_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_NATIVE_TAB_CONTENTS_VIEW_WIN_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_NATIVE_TAB_CONTENTS_VIEW_WIN_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_NATIVE_TAB_CONTENTS_VIEW_WIN_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_view.h" | 9 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_view.h" |
10 #include "ui/views/widget/native_widget_win.h" | 10 #include "ui/views/widget/native_widget_win.h" |
11 | 11 |
12 class WebDropTarget; | 12 class WebDragBookmarkHandlerWin; |
| 13 class WebDragDest; |
13 class TabContentsDragWin; | 14 class TabContentsDragWin; |
14 | 15 |
15 namespace content { | 16 namespace content { |
16 class RenderWidgetHostView; | 17 class RenderWidgetHostView; |
17 class WebContents; | 18 class WebContents; |
18 } | 19 } |
19 | 20 |
20 class NativeTabContentsViewWin : public views::NativeWidgetWin, | 21 class NativeTabContentsViewWin : public views::NativeWidgetWin, |
21 public NativeTabContentsView { | 22 public NativeTabContentsView { |
22 public: | 23 public: |
23 explicit NativeTabContentsViewWin( | 24 explicit NativeTabContentsViewWin( |
24 internal::NativeTabContentsViewDelegate* delegate); | 25 internal::NativeTabContentsViewDelegate* delegate); |
25 virtual ~NativeTabContentsViewWin(); | 26 virtual ~NativeTabContentsViewWin(); |
26 | 27 |
27 WebDropTarget* drop_target() const { return drop_target_.get(); } | 28 WebDragDest* drag_dest() const { return drag_dest_.get(); } |
28 | 29 |
29 content::WebContents* GetWebContents() const; | 30 content::WebContents* GetWebContents() const; |
30 | 31 |
31 void EndDragging(); | 32 void EndDragging(); |
32 | 33 |
33 private: | 34 private: |
34 // Overridden from NativeTabContentsView: | 35 // Overridden from NativeTabContentsView: |
35 virtual void InitNativeTabContentsView() OVERRIDE; | 36 virtual void InitNativeTabContentsView() OVERRIDE; |
36 virtual void Unparent() OVERRIDE; | 37 virtual void Unparent() OVERRIDE; |
37 virtual content::RenderWidgetHostView* CreateRenderWidgetHostView( | 38 virtual content::RenderWidgetHostView* CreateRenderWidgetHostView( |
(...skipping 30 matching lines...) Expand all Loading... |
68 virtual LRESULT OnNCHitTest(const CPoint& point) OVERRIDE; | 69 virtual LRESULT OnNCHitTest(const CPoint& point) OVERRIDE; |
69 | 70 |
70 // Backend for all scroll messages, the |message| parameter indicates which | 71 // Backend for all scroll messages, the |message| parameter indicates which |
71 // one it is. | 72 // one it is. |
72 void ScrollCommon(UINT message, int scroll_type, short position, | 73 void ScrollCommon(UINT message, int scroll_type, short position, |
73 HWND scrollbar); | 74 HWND scrollbar); |
74 bool ScrollZoom(int scroll_type); | 75 bool ScrollZoom(int scroll_type); |
75 | 76 |
76 internal::NativeTabContentsViewDelegate* delegate_; | 77 internal::NativeTabContentsViewDelegate* delegate_; |
77 | 78 |
| 79 scoped_ptr<WebDragBookmarkHandlerWin> bookmark_handler_; |
78 // A drop target object that handles drags over this TabContents. | 80 // A drop target object that handles drags over this TabContents. |
79 scoped_refptr<WebDropTarget> drop_target_; | 81 scoped_refptr<WebDragDest> drag_dest_; |
80 | 82 |
81 // Used to handle the drag-and-drop. | 83 // Used to handle the drag-and-drop. |
82 scoped_refptr<TabContentsDragWin> drag_handler_; | 84 scoped_refptr<TabContentsDragWin> drag_handler_; |
83 | 85 |
84 DISALLOW_COPY_AND_ASSIGN(NativeTabContentsViewWin); | 86 DISALLOW_COPY_AND_ASSIGN(NativeTabContentsViewWin); |
85 }; | 87 }; |
86 | 88 |
87 #endif // CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_NATIVE_TAB_CONTENTS_VIEW_WIN_H_ | 89 #endif // CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_NATIVE_TAB_CONTENTS_VIEW_WIN_H_ |
OLD | NEW |