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

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

Issue 2501213002: Drag-and-drop: dragSourceEndedAt, dragSourceSystemDragEnded (Closed)
Patch Set: 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 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after
1181 } 1181 }
1182 1182
1183 bool handled = true; 1183 bool handled = true;
1184 IPC_BEGIN_MESSAGE_MAP(RenderViewImpl, message) 1184 IPC_BEGIN_MESSAGE_MAP(RenderViewImpl, message)
1185 IPC_MESSAGE_HANDLER(InputMsg_ExecuteEditCommand, OnExecuteEditCommand) 1185 IPC_MESSAGE_HANDLER(InputMsg_ExecuteEditCommand, OnExecuteEditCommand)
1186 IPC_MESSAGE_HANDLER(InputMsg_MoveCaret, OnMoveCaret) 1186 IPC_MESSAGE_HANDLER(InputMsg_MoveCaret, OnMoveCaret)
1187 IPC_MESSAGE_HANDLER(InputMsg_ScrollFocusedEditableNodeIntoRect, 1187 IPC_MESSAGE_HANDLER(InputMsg_ScrollFocusedEditableNodeIntoRect,
1188 OnScrollFocusedEditableNodeIntoRect) 1188 OnScrollFocusedEditableNodeIntoRect)
1189 IPC_MESSAGE_HANDLER(ViewMsg_SetPageScale, OnSetPageScale) 1189 IPC_MESSAGE_HANDLER(ViewMsg_SetPageScale, OnSetPageScale)
1190 IPC_MESSAGE_HANDLER(ViewMsg_Zoom, OnZoom) 1190 IPC_MESSAGE_HANDLER(ViewMsg_Zoom, OnZoom)
1191 IPC_MESSAGE_HANDLER(DragMsg_SourceEnded, OnDragSourceEnded)
1192 IPC_MESSAGE_HANDLER(DragMsg_SourceSystemDragEnded,
1193 OnDragSourceSystemDragEnded)
1194 IPC_MESSAGE_HANDLER(ViewMsg_AllowBindings, OnAllowBindings) 1191 IPC_MESSAGE_HANDLER(ViewMsg_AllowBindings, OnAllowBindings)
1195 IPC_MESSAGE_HANDLER(ViewMsg_SetInitialFocus, OnSetInitialFocus) 1192 IPC_MESSAGE_HANDLER(ViewMsg_SetInitialFocus, OnSetInitialFocus)
1196 IPC_MESSAGE_HANDLER(ViewMsg_UpdateTargetURL_ACK, OnUpdateTargetURLAck) 1193 IPC_MESSAGE_HANDLER(ViewMsg_UpdateTargetURL_ACK, OnUpdateTargetURLAck)
1197 IPC_MESSAGE_HANDLER(ViewMsg_UpdateWebPreferences, OnUpdateWebPreferences) 1194 IPC_MESSAGE_HANDLER(ViewMsg_UpdateWebPreferences, OnUpdateWebPreferences)
1198 IPC_MESSAGE_HANDLER(ViewMsg_EnumerateDirectoryResponse, 1195 IPC_MESSAGE_HANDLER(ViewMsg_EnumerateDirectoryResponse,
1199 OnEnumerateDirectoryResponse) 1196 OnEnumerateDirectoryResponse)
1200 IPC_MESSAGE_HANDLER(ViewMsg_ClosePage, OnClosePage) 1197 IPC_MESSAGE_HANDLER(ViewMsg_ClosePage, OnClosePage)
1201 IPC_MESSAGE_HANDLER(ViewMsg_MoveOrResizeStarted, OnMoveOrResizeStarted) 1198 IPC_MESSAGE_HANDLER(ViewMsg_MoveOrResizeStarted, OnMoveOrResizeStarted)
1202 IPC_MESSAGE_HANDLER(ViewMsg_ClearFocusedElement, OnClearFocusedElement) 1199 IPC_MESSAGE_HANDLER(ViewMsg_ClearFocusedElement, OnClearFocusedElement)
1203 IPC_MESSAGE_HANDLER(ViewMsg_SetBackgroundOpaque, OnSetBackgroundOpaque) 1200 IPC_MESSAGE_HANDLER(ViewMsg_SetBackgroundOpaque, OnSetBackgroundOpaque)
(...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after
2112 2109
2113 enabled_bindings_ |= enabled_bindings_flags; 2110 enabled_bindings_ |= enabled_bindings_flags;
2114 2111
2115 // Keep track of the total bindings accumulated in this process. 2112 // Keep track of the total bindings accumulated in this process.
2116 RenderProcess::current()->AddBindings(enabled_bindings_flags); 2113 RenderProcess::current()->AddBindings(enabled_bindings_flags);
2117 2114
2118 if (main_render_frame_) 2115 if (main_render_frame_)
2119 main_render_frame_->MaybeEnableMojoBindings(); 2116 main_render_frame_->MaybeEnableMojoBindings();
2120 } 2117 }
2121 2118
2122 void RenderViewImpl::OnDragSourceEnded(const gfx::Point& client_point,
2123 const gfx::Point& screen_point,
2124 WebDragOperation op) {
2125 webview()->dragSourceEndedAt(
2126 ConvertWindowPointToViewport(client_point), screen_point, op);
2127 }
2128
2129 void RenderViewImpl::OnDragSourceSystemDragEnded() {
2130 webview()->dragSourceSystemDragEnded();
2131 }
2132
2133 void RenderViewImpl::OnUpdateWebPreferences(const WebPreferences& prefs) { 2119 void RenderViewImpl::OnUpdateWebPreferences(const WebPreferences& prefs) {
2134 webkit_preferences_ = prefs; 2120 webkit_preferences_ = prefs;
2135 ApplyWebPreferencesInternal(webkit_preferences_, webview(), compositor_deps_); 2121 ApplyWebPreferencesInternal(webkit_preferences_, webview(), compositor_deps_);
2136 } 2122 }
2137 2123
2138 void RenderViewImpl::OnEnumerateDirectoryResponse( 2124 void RenderViewImpl::OnEnumerateDirectoryResponse(
2139 int id, 2125 int id,
2140 const std::vector<base::FilePath>& paths) { 2126 const std::vector<base::FilePath>& paths) {
2141 if (!enumeration_completions_[id]) 2127 if (!enumeration_completions_[id])
2142 return; 2128 return;
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
2792 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); 2778 INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
2793 } 2779 }
2794 2780
2795 std::unique_ptr<InputEventAck> ack( 2781 std::unique_ptr<InputEventAck> ack(
2796 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type, 2782 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type,
2797 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); 2783 INPUT_EVENT_ACK_STATE_NOT_CONSUMED));
2798 OnInputEventAck(std::move(ack)); 2784 OnInputEventAck(std::move(ack));
2799 } 2785 }
2800 2786
2801 } // namespace content 2787 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698