| OLD | NEW |
| 1 // Copyright (c) 2011 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 WebDropTarget; |
| 13 class TabContentsDragWin; | 13 class TabContentsDragWin; |
| 14 | 14 |
| 15 namespace content { | 15 namespace content { |
| 16 class RenderWidgetHostView; |
| 16 class WebContents; | 17 class WebContents; |
| 17 } | 18 } |
| 18 | 19 |
| 19 class NativeTabContentsViewWin : public views::NativeWidgetWin, | 20 class NativeTabContentsViewWin : public views::NativeWidgetWin, |
| 20 public NativeTabContentsView { | 21 public NativeTabContentsView { |
| 21 public: | 22 public: |
| 22 explicit NativeTabContentsViewWin( | 23 explicit NativeTabContentsViewWin( |
| 23 internal::NativeTabContentsViewDelegate* delegate); | 24 internal::NativeTabContentsViewDelegate* delegate); |
| 24 virtual ~NativeTabContentsViewWin(); | 25 virtual ~NativeTabContentsViewWin(); |
| 25 | 26 |
| 26 WebDropTarget* drop_target() const { return drop_target_.get(); } | 27 WebDropTarget* drop_target() const { return drop_target_.get(); } |
| 27 | 28 |
| 28 content::WebContents* GetWebContents() const; | 29 content::WebContents* GetWebContents() const; |
| 29 | 30 |
| 30 void EndDragging(); | 31 void EndDragging(); |
| 31 | 32 |
| 32 private: | 33 private: |
| 33 // Overridden from NativeTabContentsView: | 34 // Overridden from NativeTabContentsView: |
| 34 virtual void InitNativeTabContentsView() OVERRIDE; | 35 virtual void InitNativeTabContentsView() OVERRIDE; |
| 35 virtual void Unparent() OVERRIDE; | 36 virtual void Unparent() OVERRIDE; |
| 36 virtual RenderWidgetHostView* CreateRenderWidgetHostView( | 37 virtual content::RenderWidgetHostView* CreateRenderWidgetHostView( |
| 37 RenderWidgetHost* render_widget_host) OVERRIDE; | 38 RenderWidgetHost* render_widget_host) OVERRIDE; |
| 38 virtual gfx::NativeWindow GetTopLevelNativeWindow() const OVERRIDE; | 39 virtual gfx::NativeWindow GetTopLevelNativeWindow() const OVERRIDE; |
| 39 virtual void SetPageTitle(const string16& title) OVERRIDE; | 40 virtual void SetPageTitle(const string16& title) OVERRIDE; |
| 40 virtual void StartDragging(const WebDropData& drop_data, | 41 virtual void StartDragging(const WebDropData& drop_data, |
| 41 WebKit::WebDragOperationsMask ops, | 42 WebKit::WebDragOperationsMask ops, |
| 42 const SkBitmap& image, | 43 const SkBitmap& image, |
| 43 const gfx::Point& image_offset) OVERRIDE; | 44 const gfx::Point& image_offset) OVERRIDE; |
| 44 virtual void CancelDrag() OVERRIDE; | 45 virtual void CancelDrag() OVERRIDE; |
| 45 virtual bool IsDoingDrag() const OVERRIDE; | 46 virtual bool IsDoingDrag() const OVERRIDE; |
| 46 virtual void SetDragCursor(WebKit::WebDragOperation operation) OVERRIDE; | 47 virtual void SetDragCursor(WebKit::WebDragOperation operation) OVERRIDE; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 76 // A drop target object that handles drags over this TabContents. | 77 // A drop target object that handles drags over this TabContents. |
| 77 scoped_refptr<WebDropTarget> drop_target_; | 78 scoped_refptr<WebDropTarget> drop_target_; |
| 78 | 79 |
| 79 // Used to handle the drag-and-drop. | 80 // Used to handle the drag-and-drop. |
| 80 scoped_refptr<TabContentsDragWin> drag_handler_; | 81 scoped_refptr<TabContentsDragWin> drag_handler_; |
| 81 | 82 |
| 82 DISALLOW_COPY_AND_ASSIGN(NativeTabContentsViewWin); | 83 DISALLOW_COPY_AND_ASSIGN(NativeTabContentsViewWin); |
| 83 }; | 84 }; |
| 84 | 85 |
| 85 #endif // CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_NATIVE_TAB_CONTENTS_VIEW_WIN_H_ | 86 #endif // CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_NATIVE_TAB_CONTENTS_VIEW_WIN_H_ |
| OLD | NEW |