OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_WEB_CONTENTS_VIEW_ANDROID_H_ | |
6 #define CONTENT_BROWSER_TAB_CONTENTS_WEB_CONTENTS_VIEW_ANDROID_H_ | |
7 #pragma once | |
8 | |
9 #include "content/public/browser/web_contents_view.h" | |
10 | |
11 class WebContentsViewAndroid : public content::WebContentsView { | |
12 public: | |
13 explicit WebContentsViewAndroid(content::WebContents* web_contents); | |
14 virtual ~WebContentsViewAndroid(); | |
15 | |
16 // WebContentsView implementation -------------------------------------------- | |
17 | |
18 virtual void CreateView(const gfx::Size& initial_size) OVERRIDE; | |
19 virtual content::RenderWidgetHostView* CreateViewForWidget( | |
20 content::RenderWidgetHost* render_widget_host) OVERRIDE; | |
21 | |
22 virtual gfx::NativeView GetNativeView() const OVERRIDE; | |
23 virtual gfx::NativeView GetContentNativeView() const OVERRIDE; | |
24 virtual gfx::NativeWindow GetTopLevelNativeWindow() const OVERRIDE; | |
25 virtual void GetContainerBounds(gfx::Rect* out) const OVERRIDE; | |
26 virtual void SetPageTitle(const string16& title) OVERRIDE; | |
27 virtual void OnTabCrashed(base::TerminationStatus status, | |
28 int error_code) OVERRIDE; | |
29 virtual void SizeContents(const gfx::Size& size) OVERRIDE; | |
30 virtual void RenderViewCreated(content::RenderViewHost* host) OVERRIDE; | |
31 virtual void Focus() OVERRIDE; | |
32 virtual void SetInitialFocus() OVERRIDE; | |
33 virtual void StoreFocus() OVERRIDE; | |
34 virtual void RestoreFocus() OVERRIDE; | |
35 virtual bool IsDoingDrag() const OVERRIDE; | |
36 virtual void CancelDragAndCloseTab() OVERRIDE; | |
37 virtual bool IsEventTracking() const OVERRIDE; | |
38 virtual void CloseTabAfterEventTracking() OVERRIDE; | |
39 virtual void GetViewBounds(gfx::Rect* out) const OVERRIDE; | |
40 | |
41 // Backend implementation of RenderViewHostDelegate::View. | |
42 virtual void CreateNewWindow( | |
43 int route_id, | |
44 const ViewHostMsg_CreateWindow_Params& params) OVERRIDE; | |
45 virtual void CreateNewWidget(int route_id, | |
46 WebKit::WebPopupType popup_type) OVERRIDE; | |
47 virtual void CreateNewFullscreenWidget(int route_id) OVERRIDE; | |
48 virtual void ShowCreatedWindow(int route_id, | |
49 WindowOpenDisposition disposition, | |
50 const gfx::Rect& initial_pos, | |
51 bool user_gesture) OVERRIDE; | |
52 virtual void ShowCreatedWidget(int route_id, | |
53 const gfx::Rect& initial_pos) OVERRIDE; | |
54 virtual void ShowCreatedFullscreenWidget(int route_id) OVERRIDE; | |
55 virtual void ShowContextMenu( | |
56 const content::ContextMenuParams& params) OVERRIDE; | |
57 virtual void ShowPopupMenu(const gfx::Rect& bounds, | |
58 int item_height, | |
59 double item_font_size, | |
60 int selected_item, | |
61 const std::vector<WebMenuItem>& items, | |
62 bool right_aligned) OVERRIDE; | |
63 virtual void StartDragging(const WebDropData& drop_data, | |
64 WebKit::WebDragOperationsMask allowed_ops, | |
65 const SkBitmap& image, | |
66 const gfx::Point& image_offset) OVERRIDE; | |
67 virtual void UpdateDragCursor(WebKit::WebDragOperation operation) OVERRIDE; | |
68 virtual void GotFocus() OVERRIDE; | |
69 virtual void TakeFocus(bool reverse) OVERRIDE; | |
70 | |
71 private: | |
72 // The WebContents whose contents we display. | |
73 content::WebContents* web_contents_; | |
74 | |
75 DISALLOW_COPY_AND_ASSIGN(WebContentsViewAndroid); | |
76 }; | |
77 | |
78 #endif // CONTENT_BROWSER_TAB_CONTENTS_WEB_CONTENTS_VIEW_ANDROID_H_ | |
OLD | NEW |