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_ANDROID_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_ANDROID_H_ |
6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_ANDROID_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_ANDROID_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "content/browser/renderer_host/render_view_host_delegate_view.h" | 11 #include "content/browser/renderer_host/render_view_host_delegate_view.h" |
12 #include "content/browser/web_contents/web_contents_view.h" | 12 #include "content/browser/web_contents/web_contents_view.h" |
13 #include "content/public/browser/web_contents_view_delegate.h" | 13 #include "content/public/browser/web_contents_view_delegate.h" |
14 #include "content/public/common/context_menu_params.h" | 14 #include "content/public/common/context_menu_params.h" |
| 15 #include "content/public/common/drop_data.h" |
15 #include "ui/gfx/geometry/rect_f.h" | 16 #include "ui/gfx/geometry/rect_f.h" |
16 | 17 |
17 namespace content { | 18 namespace content { |
18 class ContentViewCoreImpl; | 19 class ContentViewCoreImpl; |
19 class WebContentsImpl; | 20 class WebContentsImpl; |
20 | 21 |
21 // Android-specific implementation of the WebContentsView. | 22 // Android-specific implementation of the WebContentsView. |
22 class WebContentsViewAndroid : public WebContentsView, | 23 class WebContentsViewAndroid : public WebContentsView, |
23 public RenderViewHostDelegateView { | 24 public RenderViewHostDelegateView { |
24 public: | 25 public: |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 void HidePopupMenu() override; | 70 void HidePopupMenu() override; |
70 void StartDragging(const DropData& drop_data, | 71 void StartDragging(const DropData& drop_data, |
71 blink::WebDragOperationsMask allowed_ops, | 72 blink::WebDragOperationsMask allowed_ops, |
72 const gfx::ImageSkia& image, | 73 const gfx::ImageSkia& image, |
73 const gfx::Vector2d& image_offset, | 74 const gfx::Vector2d& image_offset, |
74 const DragEventSourceInfo& event_info) override; | 75 const DragEventSourceInfo& event_info) override; |
75 void UpdateDragCursor(blink::WebDragOperation operation) override; | 76 void UpdateDragCursor(blink::WebDragOperation operation) override; |
76 void GotFocus() override; | 77 void GotFocus() override; |
77 void TakeFocus(bool reverse) override; | 78 void TakeFocus(bool reverse) override; |
78 | 79 |
| 80 void OnDragEntered(const std::vector<DropData::Metadata>& metadata, |
| 81 const gfx::Point& location, |
| 82 const gfx::Point& screen_location); |
| 83 void OnDragUpdated(const gfx::Point& location, |
| 84 const gfx::Point& screen_location); |
| 85 void OnDragExited(); |
| 86 void OnPerformDrop(DropData* drop_data, |
| 87 const gfx::Point& location, |
| 88 const gfx::Point& screen_location); |
| 89 |
79 private: | 90 private: |
80 // The WebContents whose contents we display. | 91 // The WebContents whose contents we display. |
81 WebContentsImpl* web_contents_; | 92 WebContentsImpl* web_contents_; |
82 | 93 |
83 // ContentViewCoreImpl is our interface to the view system. | 94 // ContentViewCoreImpl is our interface to the view system. |
84 ContentViewCoreImpl* content_view_core_; | 95 ContentViewCoreImpl* content_view_core_; |
85 | 96 |
86 // Interface for extensions to WebContentsView. Used to show the context menu. | 97 // Interface for extensions to WebContentsView. Used to show the context menu. |
87 std::unique_ptr<WebContentsViewDelegate> delegate_; | 98 std::unique_ptr<WebContentsViewDelegate> delegate_; |
88 | 99 |
89 DISALLOW_COPY_AND_ASSIGN(WebContentsViewAndroid); | 100 DISALLOW_COPY_AND_ASSIGN(WebContentsViewAndroid); |
90 }; | 101 }; |
91 | 102 |
92 } // namespace content | 103 } // namespace content |
93 | 104 |
94 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_ANDROID_H_ | 105 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_ANDROID_H_ |
OLD | NEW |