| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 // Backend implementation of RenderViewHostDelegateView. | 80 // Backend implementation of RenderViewHostDelegateView. |
| 81 virtual void ShowContextMenu(RenderFrameHost* render_frame_host, | 81 virtual void ShowContextMenu(RenderFrameHost* render_frame_host, |
| 82 const ContextMenuParams& params) OVERRIDE; | 82 const ContextMenuParams& params) OVERRIDE; |
| 83 virtual void ShowPopupMenu(const gfx::Rect& bounds, | 83 virtual void ShowPopupMenu(const gfx::Rect& bounds, |
| 84 int item_height, | 84 int item_height, |
| 85 double item_font_size, | 85 double item_font_size, |
| 86 int selected_item, | 86 int selected_item, |
| 87 const std::vector<MenuItem>& items, | 87 const std::vector<MenuItem>& items, |
| 88 bool right_aligned, | 88 bool right_aligned, |
| 89 bool allow_multiple_selection) OVERRIDE; | 89 bool allow_multiple_selection) OVERRIDE; |
| 90 virtual void HidePopupMenu() OVERRIDE; |
| 90 virtual void StartDragging(const DropData& drop_data, | 91 virtual void StartDragging(const DropData& drop_data, |
| 91 blink::WebDragOperationsMask allowed_ops, | 92 blink::WebDragOperationsMask allowed_ops, |
| 92 const gfx::ImageSkia& image, | 93 const gfx::ImageSkia& image, |
| 93 const gfx::Vector2d& image_offset, | 94 const gfx::Vector2d& image_offset, |
| 94 const DragEventSourceInfo& event_info) OVERRIDE; | 95 const DragEventSourceInfo& event_info) OVERRIDE; |
| 95 virtual void UpdateDragCursor(blink::WebDragOperation operation) OVERRIDE; | 96 virtual void UpdateDragCursor(blink::WebDragOperation operation) OVERRIDE; |
| 96 virtual void GotFocus() OVERRIDE; | 97 virtual void GotFocus() OVERRIDE; |
| 97 virtual void TakeFocus(bool reverse) OVERRIDE; | 98 virtual void TakeFocus(bool reverse) OVERRIDE; |
| 98 | 99 |
| 99 private: | 100 private: |
| 100 // The WebContentsImpl whose contents we display. | 101 // The WebContentsImpl whose contents we display. |
| 101 WebContentsImpl* web_contents_; | 102 WebContentsImpl* web_contents_; |
| 102 BrowserPluginGuest* guest_; | 103 BrowserPluginGuest* guest_; |
| 103 // The platform dependent view backing this WebContentsView. | 104 // The platform dependent view backing this WebContentsView. |
| 104 // Calls to this WebContentsViewGuest are forwarded to |platform_view_|. | 105 // Calls to this WebContentsViewGuest are forwarded to |platform_view_|. |
| 105 scoped_ptr<WebContentsViewPort> platform_view_; | 106 scoped_ptr<WebContentsViewPort> platform_view_; |
| 106 gfx::Size size_; | 107 gfx::Size size_; |
| 107 | 108 |
| 108 // Delegate view for guest's platform view. | 109 // Delegate view for guest's platform view. |
| 109 RenderViewHostDelegateView* platform_view_delegate_view_; | 110 RenderViewHostDelegateView* platform_view_delegate_view_; |
| 110 | 111 |
| 111 DISALLOW_COPY_AND_ASSIGN(WebContentsViewGuest); | 112 DISALLOW_COPY_AND_ASSIGN(WebContentsViewGuest); |
| 112 }; | 113 }; |
| 113 | 114 |
| 114 } // namespace content | 115 } // namespace content |
| 115 | 116 |
| 116 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_GUEST_H_ | 117 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_GUEST_H_ |
| OLD | NEW |