Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(452)

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 2501213002: Drag-and-drop: dragSourceEndedAt, dragSourceSystemDragEnded (Closed)
Patch Set: Rebased. Added check for !GetWebWidget(). Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include "content/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 1171 matching lines...) Expand 10 before | Expand all | Expand 10 after
1182 } 1182 }
1183 1183
1184 bool handled = true; 1184 bool handled = true;
1185 IPC_BEGIN_MESSAGE_MAP(RenderViewImpl, message) 1185 IPC_BEGIN_MESSAGE_MAP(RenderViewImpl, message)
1186 IPC_MESSAGE_HANDLER(InputMsg_ExecuteEditCommand, OnExecuteEditCommand) 1186 IPC_MESSAGE_HANDLER(InputMsg_ExecuteEditCommand, OnExecuteEditCommand)
1187 IPC_MESSAGE_HANDLER(InputMsg_MoveCaret, OnMoveCaret) 1187 IPC_MESSAGE_HANDLER(InputMsg_MoveCaret, OnMoveCaret)
1188 IPC_MESSAGE_HANDLER(InputMsg_ScrollFocusedEditableNodeIntoRect, 1188 IPC_MESSAGE_HANDLER(InputMsg_ScrollFocusedEditableNodeIntoRect,
1189 OnScrollFocusedEditableNodeIntoRect) 1189 OnScrollFocusedEditableNodeIntoRect)
1190 IPC_MESSAGE_HANDLER(ViewMsg_SetPageScale, OnSetPageScale) 1190 IPC_MESSAGE_HANDLER(ViewMsg_SetPageScale, OnSetPageScale)
1191 IPC_MESSAGE_HANDLER(ViewMsg_Zoom, OnZoom) 1191 IPC_MESSAGE_HANDLER(ViewMsg_Zoom, OnZoom)
1192 IPC_MESSAGE_HANDLER(DragMsg_SourceEnded, OnDragSourceEnded)
1193 IPC_MESSAGE_HANDLER(DragMsg_SourceSystemDragEnded,
1194 OnDragSourceSystemDragEnded)
1195 IPC_MESSAGE_HANDLER(ViewMsg_AllowBindings, OnAllowBindings) 1192 IPC_MESSAGE_HANDLER(ViewMsg_AllowBindings, OnAllowBindings)
1196 IPC_MESSAGE_HANDLER(ViewMsg_SetInitialFocus, OnSetInitialFocus) 1193 IPC_MESSAGE_HANDLER(ViewMsg_SetInitialFocus, OnSetInitialFocus)
1197 IPC_MESSAGE_HANDLER(ViewMsg_UpdateTargetURL_ACK, OnUpdateTargetURLAck) 1194 IPC_MESSAGE_HANDLER(ViewMsg_UpdateTargetURL_ACK, OnUpdateTargetURLAck)
1198 IPC_MESSAGE_HANDLER(ViewMsg_UpdateWebPreferences, OnUpdateWebPreferences) 1195 IPC_MESSAGE_HANDLER(ViewMsg_UpdateWebPreferences, OnUpdateWebPreferences)
1199 IPC_MESSAGE_HANDLER(ViewMsg_EnumerateDirectoryResponse, 1196 IPC_MESSAGE_HANDLER(ViewMsg_EnumerateDirectoryResponse,
1200 OnEnumerateDirectoryResponse) 1197 OnEnumerateDirectoryResponse)
1201 IPC_MESSAGE_HANDLER(ViewMsg_ClosePage, OnClosePage) 1198 IPC_MESSAGE_HANDLER(ViewMsg_ClosePage, OnClosePage)
1202 IPC_MESSAGE_HANDLER(ViewMsg_MoveOrResizeStarted, OnMoveOrResizeStarted) 1199 IPC_MESSAGE_HANDLER(ViewMsg_MoveOrResizeStarted, OnMoveOrResizeStarted)
1203 IPC_MESSAGE_HANDLER(ViewMsg_ClearFocusedElement, OnClearFocusedElement) 1200 IPC_MESSAGE_HANDLER(ViewMsg_ClearFocusedElement, OnClearFocusedElement)
1204 IPC_MESSAGE_HANDLER(ViewMsg_SetBackgroundOpaque, OnSetBackgroundOpaque) 1201 IPC_MESSAGE_HANDLER(ViewMsg_SetBackgroundOpaque, OnSetBackgroundOpaque)
(...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after
2113 2110
2114 enabled_bindings_ |= enabled_bindings_flags; 2111 enabled_bindings_ |= enabled_bindings_flags;
2115 2112
2116 // Keep track of the total bindings accumulated in this process. 2113 // Keep track of the total bindings accumulated in this process.
2117 RenderProcess::current()->AddBindings(enabled_bindings_flags); 2114 RenderProcess::current()->AddBindings(enabled_bindings_flags);
2118 2115
2119 if (main_render_frame_) 2116 if (main_render_frame_)
2120 main_render_frame_->MaybeEnableMojoBindings(); 2117 main_render_frame_->MaybeEnableMojoBindings();
2121 } 2118 }
2122 2119
2123 void RenderViewImpl::OnDragSourceEnded(const gfx::Point& client_point,
2124 const gfx::Point& screen_point,
2125 WebDragOperation op) {
2126 webview()->dragSourceEndedAt(
2127 ConvertWindowPointToViewport(client_point), screen_point, op);
2128 }
2129
2130 void RenderViewImpl::OnDragSourceSystemDragEnded() {
2131 webview()->dragSourceSystemDragEnded();
2132 }
2133
2134 void RenderViewImpl::OnUpdateWebPreferences(const WebPreferences& prefs) { 2120 void RenderViewImpl::OnUpdateWebPreferences(const WebPreferences& prefs) {
2135 webkit_preferences_ = prefs; 2121 webkit_preferences_ = prefs;
2136 ApplyWebPreferencesInternal(webkit_preferences_, webview(), compositor_deps_); 2122 ApplyWebPreferencesInternal(webkit_preferences_, webview(), compositor_deps_);
2137 } 2123 }
2138 2124
2139 void RenderViewImpl::OnEnumerateDirectoryResponse( 2125 void RenderViewImpl::OnEnumerateDirectoryResponse(
2140 int id, 2126 int id,
2141 const std::vector<base::FilePath>& paths) { 2127 const std::vector<base::FilePath>& paths) {
2142 if (!enumeration_completions_[id]) 2128 if (!enumeration_completions_[id])
2143 return; 2129 return;
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
2793 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); 2779 INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
2794 } 2780 }
2795 2781
2796 std::unique_ptr<InputEventAck> ack( 2782 std::unique_ptr<InputEventAck> ack(
2797 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type, 2783 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type,
2798 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); 2784 INPUT_EVENT_ACK_STATE_NOT_CONSUMED));
2799 OnInputEventAck(std::move(ack)); 2785 OnInputEventAck(std::move(ack));
2800 } 2786 }
2801 2787
2802 } // namespace content 2788 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698