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

Side by Side Diff: content/browser/browser_plugin/browser_plugin_embedder.cc

Issue 885803002: <webview> fix drag and drop issues. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clean up for review, add comments Created 5 years, 10 months 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
« no previous file with comments | « no previous file | content/browser/browser_plugin/browser_plugin_guest.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/browser/browser_plugin/browser_plugin_embedder.h" 5 #include "content/browser/browser_plugin/browser_plugin_embedder.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "content/browser/browser_plugin/browser_plugin_guest.h" 8 #include "content/browser/browser_plugin/browser_plugin_guest.h"
9 #include "content/browser/renderer_host/render_view_host_impl.h" 9 #include "content/browser/renderer_host/render_view_host_impl.h"
10 #include "content/browser/web_contents/web_contents_impl.h" 10 #include "content/browser/web_contents/web_contents_impl.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 client_y - guest_offset.y(), screen_x, screen_y, operation); 117 client_y - guest_offset.y(), screen_x, screen_y, operation);
118 } 118 }
119 ClearGuestDragStateIfApplicable(); 119 ClearGuestDragStateIfApplicable();
120 } 120 }
121 121
122 void BrowserPluginEmbedder::SystemDragEnded() { 122 void BrowserPluginEmbedder::SystemDragEnded() {
123 // When the embedder's drag/drop operation ends, we need to pass the message 123 // When the embedder's drag/drop operation ends, we need to pass the message
124 // to the guest that initiated the drag/drop operation. This will ensure that 124 // to the guest that initiated the drag/drop operation. This will ensure that
125 // the guest's RVH state is reset properly. 125 // the guest's RVH state is reset properly.
126 if (guest_started_drag_) 126 if (guest_started_drag_)
127 guest_started_drag_->EndSystemDrag(); 127 guest_started_drag_->EmbedderSystemDragEnded();
128
128 guest_dragging_over_.reset(); 129 guest_dragging_over_.reset();
129 ClearGuestDragStateIfApplicable(); 130 ClearGuestDragStateIfApplicable();
130 } 131 }
131 132
132 void BrowserPluginEmbedder::OnUpdateDragCursor(bool* handled) { 133 void BrowserPluginEmbedder::OnUpdateDragCursor(bool* handled) {
133 *handled = (guest_dragging_over_.get() != NULL); 134 *handled = (guest_dragging_over_.get() != NULL);
134 } 135 }
135 136
136 void BrowserPluginEmbedder::OnAttach( 137 void BrowserPluginEmbedder::OnAttach(
137 int browser_plugin_instance_id, 138 int browser_plugin_instance_id,
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 if (static_cast<WebContentsImpl*>(guest)->GetBrowserPluginGuest()->Find( 194 if (static_cast<WebContentsImpl*>(guest)->GetBrowserPluginGuest()->Find(
194 request_id, search_text, options)) { 195 request_id, search_text, options)) {
195 // There can only ever currently be one browser plugin that handles find so 196 // There can only ever currently be one browser plugin that handles find so
196 // we can break the iteration at this point. 197 // we can break the iteration at this point.
197 return true; 198 return true;
198 } 199 }
199 return false; 200 return false;
200 } 201 }
201 202
202 } // namespace content 203 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/browser_plugin/browser_plugin_guest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698