1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_NATIVE_TAB_CONTENTS_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_NATIVE_TAB_CONTENTS_VIEW_H_ 7 #pragma once 8 9 #include <string> 10 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h" 12 #include "ui/gfx/native_widget_types.h" 13 14 class RenderWidgetHost; 15 class RenderWidgetHostView; 16 struct WebDropData; 17 namespace gfx { 18 class Point; 19 } 20 namespace internal { 21 class NativeTabContentsViewDelegate; 22 } 23 namespace views { 24 class NativeWidget; 25 } 26 27 class NativeTabContentsView { 28 public: ~NativeTabContentsView()29 virtual ~NativeTabContentsView() {} 30 31 static NativeTabContentsView* CreateNativeTabContentsView( 32 internal::NativeTabContentsViewDelegate* delegate); 33 34 virtual void InitNativeTabContentsView() = 0; 35 36 virtual void Unparent() = 0; 37 38 virtual RenderWidgetHostView* CreateRenderWidgetHostView( 39 RenderWidgetHost* render_widget_host) = 0; 40 41 virtual gfx::NativeWindow GetTopLevelNativeWindow() const = 0; 42 43 virtual void SetPageTitle(const std::wstring& title) = 0; 44 45 virtual void StartDragging(const WebDropData& drop_data, 46 WebKit::WebDragOperationsMask ops, 47 const SkBitmap& image, 48 const gfx::Point& image_offset) = 0; 49 virtual void CancelDrag() = 0; 50 virtual bool IsDoingDrag() const = 0; 51 virtual void SetDragCursor(WebKit::WebDragOperation operation) = 0; 52 53 virtual views::NativeWidget* AsNativeWidget() = 0; 54 }; 55 56 #endif // CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_NATIVE_TAB_CONTENTS_VIEW_H_ 57