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 std::vector<int> locations); | |
dcheng
2016/06/24 23:07:53
Let's just pass gfx::Points here. It's a bit more
hush (inactive)
2016/06/27 19:01:54
Done.
| |
82 void OnDragUpdated(std::vector<int> locations); | |
83 void OnDragExited(); | |
84 void OnPerformDrop(DropData& drop_data, std::vector<int> locations); | |
dcheng
2016/06/24 23:07:53
Chromium/C++ style doesn't permit mutable referenc
hush (inactive)
2016/06/27 19:01:54
use DropData* instead
| |
85 | |
79 private: | 86 private: |
80 // The WebContents whose contents we display. | 87 // The WebContents whose contents we display. |
81 WebContentsImpl* web_contents_; | 88 WebContentsImpl* web_contents_; |
82 | 89 |
83 // ContentViewCoreImpl is our interface to the view system. | 90 // ContentViewCoreImpl is our interface to the view system. |
84 ContentViewCoreImpl* content_view_core_; | 91 ContentViewCoreImpl* content_view_core_; |
85 | 92 |
86 // Interface for extensions to WebContentsView. Used to show the context menu. | 93 // Interface for extensions to WebContentsView. Used to show the context menu. |
87 std::unique_ptr<WebContentsViewDelegate> delegate_; | 94 std::unique_ptr<WebContentsViewDelegate> delegate_; |
88 | 95 |
89 DISALLOW_COPY_AND_ASSIGN(WebContentsViewAndroid); | 96 DISALLOW_COPY_AND_ASSIGN(WebContentsViewAndroid); |
90 }; | 97 }; |
91 | 98 |
92 } // namespace content | 99 } // namespace content |
93 | 100 |
94 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_ANDROID_H_ | 101 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_ANDROID_H_ |
OLD | NEW |