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" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 void StartDragging(const DropData& drop_data, | 89 void StartDragging(const DropData& drop_data, |
90 blink::WebDragOperationsMask allowed_ops, | 90 blink::WebDragOperationsMask allowed_ops, |
91 const gfx::ImageSkia& image, | 91 const gfx::ImageSkia& image, |
92 const gfx::Vector2d& image_offset, | 92 const gfx::Vector2d& image_offset, |
93 const DragEventSourceInfo& event_info, | 93 const DragEventSourceInfo& event_info, |
94 RenderWidgetHostImpl* source_rwh) override; | 94 RenderWidgetHostImpl* source_rwh) override; |
95 void UpdateDragCursor(blink::WebDragOperation operation) override; | 95 void UpdateDragCursor(blink::WebDragOperation operation) override; |
96 void GotFocus() override; | 96 void GotFocus() override; |
97 void TakeFocus(bool reverse) override; | 97 void TakeFocus(bool reverse) override; |
98 | 98 |
| 99 // ui::ViewClient implementation. |
| 100 bool OnTouchEvent(const ui::MotionEventAndroid& event, |
| 101 bool for_touch_handle) override; |
| 102 bool OnDragEvent(const ui::DragEventAndroid& event) override; |
| 103 void OnPhysicalBackingSizeChanged() override; |
| 104 |
| 105 private: |
99 void OnDragEntered(const std::vector<DropData::Metadata>& metadata, | 106 void OnDragEntered(const std::vector<DropData::Metadata>& metadata, |
100 const gfx::Point& location, | 107 const gfx::Point& location, |
101 const gfx::Point& screen_location); | 108 const gfx::Point& screen_location); |
102 void OnDragUpdated(const gfx::Point& location, | 109 void OnDragUpdated(const gfx::Point& location, |
103 const gfx::Point& screen_location); | 110 const gfx::Point& screen_location); |
104 void OnDragExited(); | 111 void OnDragExited(); |
105 void OnPerformDrop(DropData* drop_data, | 112 void OnPerformDrop(DropData* drop_data, |
106 const gfx::Point& location, | 113 const gfx::Point& location, |
107 const gfx::Point& screen_location); | 114 const gfx::Point& screen_location); |
108 void OnDragEnded(); | 115 void OnDragEnded(); |
109 | 116 |
110 // ui::ViewClient implementation. | |
111 bool OnTouchEvent(const ui::MotionEventAndroid& event, | |
112 bool for_touch_handle) override; | |
113 void OnPhysicalBackingSizeChanged() override; | |
114 | |
115 private: | |
116 // The WebContents whose contents we display. | 117 // The WebContents whose contents we display. |
117 WebContentsImpl* web_contents_; | 118 WebContentsImpl* web_contents_; |
118 | 119 |
119 // ContentViewCoreImpl is our interface to the view system. | 120 // ContentViewCoreImpl is our interface to the view system. |
120 ContentViewCoreImpl* content_view_core_; | 121 ContentViewCoreImpl* content_view_core_; |
121 | 122 |
122 // Handles "overscroll to refresh" events | 123 // Handles "overscroll to refresh" events |
123 std::unique_ptr<ui::OverscrollRefreshHandler> overscroll_refresh_handler_; | 124 std::unique_ptr<ui::OverscrollRefreshHandler> overscroll_refresh_handler_; |
124 | 125 |
125 // Interface for extensions to WebContentsView. Used to show the context menu. | 126 // Interface for extensions to WebContentsView. Used to show the context menu. |
126 std::unique_ptr<WebContentsViewDelegate> delegate_; | 127 std::unique_ptr<WebContentsViewDelegate> delegate_; |
127 | 128 |
128 // The native view associated with the contents of the web. | 129 // The native view associated with the contents of the web. |
129 ui::ViewAndroid view_; | 130 ui::ViewAndroid view_; |
130 | 131 |
131 // Interface used to get notified of events from the synchronous compositor. | 132 // Interface used to get notified of events from the synchronous compositor. |
132 SynchronousCompositorClient* synchronous_compositor_client_; | 133 SynchronousCompositorClient* synchronous_compositor_client_; |
133 | 134 |
134 DISALLOW_COPY_AND_ASSIGN(WebContentsViewAndroid); | 135 DISALLOW_COPY_AND_ASSIGN(WebContentsViewAndroid); |
135 }; | 136 }; |
136 | 137 |
137 } // namespace content | 138 } // namespace content |
138 | 139 |
139 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_ANDROID_H_ | 140 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_ANDROID_H_ |
OLD | NEW |