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 CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_GUEST_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_GUEST_H_ |
6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_GUEST_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_GUEST_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 virtual gfx::NativeView GetContentNativeView() const OVERRIDE; | 42 virtual gfx::NativeView GetContentNativeView() const OVERRIDE; |
43 virtual gfx::NativeWindow GetTopLevelNativeWindow() const OVERRIDE; | 43 virtual gfx::NativeWindow GetTopLevelNativeWindow() const OVERRIDE; |
44 virtual void GetContainerBounds(gfx::Rect* out) const OVERRIDE; | 44 virtual void GetContainerBounds(gfx::Rect* out) const OVERRIDE; |
45 virtual void OnTabCrashed(base::TerminationStatus status, | 45 virtual void OnTabCrashed(base::TerminationStatus status, |
46 int error_code) OVERRIDE; | 46 int error_code) OVERRIDE; |
47 virtual void SizeContents(const gfx::Size& size) OVERRIDE; | 47 virtual void SizeContents(const gfx::Size& size) OVERRIDE; |
48 virtual void Focus() OVERRIDE; | 48 virtual void Focus() OVERRIDE; |
49 virtual void SetInitialFocus() OVERRIDE; | 49 virtual void SetInitialFocus() OVERRIDE; |
50 virtual void StoreFocus() OVERRIDE; | 50 virtual void StoreFocus() OVERRIDE; |
51 virtual void RestoreFocus() OVERRIDE; | 51 virtual void RestoreFocus() OVERRIDE; |
52 virtual WebDropData* GetDropData() const OVERRIDE; | 52 virtual DropData* GetDropData() const OVERRIDE; |
53 virtual gfx::Rect GetViewBounds() const OVERRIDE; | 53 virtual gfx::Rect GetViewBounds() const OVERRIDE; |
54 #if defined(OS_MACOSX) | 54 #if defined(OS_MACOSX) |
55 virtual void SetAllowOverlappingViews(bool overlapping) OVERRIDE; | 55 virtual void SetAllowOverlappingViews(bool overlapping) OVERRIDE; |
56 virtual bool GetAllowOverlappingViews() const OVERRIDE; | 56 virtual bool GetAllowOverlappingViews() const OVERRIDE; |
57 #endif | 57 #endif |
58 | 58 |
59 // WebContentsViewPort implementation ---------------------------------------- | 59 // WebContentsViewPort implementation ---------------------------------------- |
60 virtual void CreateView(const gfx::Size& initial_size, | 60 virtual void CreateView(const gfx::Size& initial_size, |
61 gfx::NativeView context) OVERRIDE; | 61 gfx::NativeView context) OVERRIDE; |
62 virtual RenderWidgetHostView* CreateViewForWidget( | 62 virtual RenderWidgetHostView* CreateViewForWidget( |
(...skipping 11 matching lines...) Expand all Loading... |
74 | 74 |
75 // Backend implementation of RenderViewHostDelegateView. | 75 // Backend implementation of RenderViewHostDelegateView. |
76 virtual void ShowContextMenu(const ContextMenuParams& params) OVERRIDE; | 76 virtual void ShowContextMenu(const ContextMenuParams& params) OVERRIDE; |
77 virtual void ShowPopupMenu(const gfx::Rect& bounds, | 77 virtual void ShowPopupMenu(const gfx::Rect& bounds, |
78 int item_height, | 78 int item_height, |
79 double item_font_size, | 79 double item_font_size, |
80 int selected_item, | 80 int selected_item, |
81 const std::vector<WebMenuItem>& items, | 81 const std::vector<WebMenuItem>& items, |
82 bool right_aligned, | 82 bool right_aligned, |
83 bool allow_multiple_selection) OVERRIDE; | 83 bool allow_multiple_selection) OVERRIDE; |
84 virtual void StartDragging(const WebDropData& drop_data, | 84 virtual void StartDragging(const DropData& drop_data, |
85 WebKit::WebDragOperationsMask allowed_ops, | 85 WebKit::WebDragOperationsMask allowed_ops, |
86 const gfx::ImageSkia& image, | 86 const gfx::ImageSkia& image, |
87 const gfx::Vector2d& image_offset, | 87 const gfx::Vector2d& image_offset, |
88 const DragEventSourceInfo& event_info) OVERRIDE; | 88 const DragEventSourceInfo& event_info) OVERRIDE; |
89 virtual void UpdateDragCursor(WebKit::WebDragOperation operation) OVERRIDE; | 89 virtual void UpdateDragCursor(WebKit::WebDragOperation operation) OVERRIDE; |
90 virtual void GotFocus() OVERRIDE; | 90 virtual void GotFocus() OVERRIDE; |
91 virtual void TakeFocus(bool reverse) OVERRIDE; | 91 virtual void TakeFocus(bool reverse) OVERRIDE; |
92 | 92 |
93 private: | 93 private: |
94 // The WebContentsImpl whose contents we display. | 94 // The WebContentsImpl whose contents we display. |
95 WebContentsImpl* web_contents_; | 95 WebContentsImpl* web_contents_; |
96 BrowserPluginGuest* guest_; | 96 BrowserPluginGuest* guest_; |
97 // The platform dependent view backing this WebContentsView. | 97 // The platform dependent view backing this WebContentsView. |
98 // Calls to this WebContentsViewGuest are forwarded to |platform_view_|. | 98 // Calls to this WebContentsViewGuest are forwarded to |platform_view_|. |
99 WebContentsViewPort* platform_view_; | 99 WebContentsViewPort* platform_view_; |
100 gfx::Size size_; | 100 gfx::Size size_; |
101 | 101 |
102 // Delegate view for guest's platform view. | 102 // Delegate view for guest's platform view. |
103 RenderViewHostDelegateView* platform_view_delegate_view_; | 103 RenderViewHostDelegateView* platform_view_delegate_view_; |
104 | 104 |
105 DISALLOW_COPY_AND_ASSIGN(WebContentsViewGuest); | 105 DISALLOW_COPY_AND_ASSIGN(WebContentsViewGuest); |
106 }; | 106 }; |
107 | 107 |
108 } // namespace content | 108 } // namespace content |
109 | 109 |
110 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_GUEST_H_ | 110 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_GUEST_H_ |
OLD | NEW |