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

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

Issue 2505113002: Drag-and-drop: Target drag messages to specific RenderWidgets. (Closed)
Patch Set: Small fix. 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/browser/browser_plugin/browser_plugin_guest.h" 5 #include "content/browser/browser_plugin/browser_plugin_guest.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 return; 507 return;
508 } 508 }
509 owner_web_contents_->Send(msg.release()); 509 owner_web_contents_->Send(msg.release());
510 } 510 }
511 511
512 void BrowserPluginGuest::DragSourceEndedAt(int client_x, 512 void BrowserPluginGuest::DragSourceEndedAt(int client_x,
513 int client_y, 513 int client_y,
514 int screen_x, 514 int screen_x,
515 int screen_y, 515 int screen_y,
516 blink::WebDragOperation operation) { 516 blink::WebDragOperation operation) {
517 // TODO(paulmeyer): This will need to target the correct specific
518 // RenderWidgetHost to work with OOPIFs. See crbug.com/647249.
519 web_contents()->GetRenderViewHost()->GetWidget()->DragSourceEndedAt( 517 web_contents()->GetRenderViewHost()->GetWidget()->DragSourceEndedAt(
520 client_x, client_y, screen_x, screen_y, operation); 518 gfx::Point(client_x, client_y),
519 gfx::Point(screen_x, screen_y),
520 operation);
521 seen_embedder_drag_source_ended_at_ = true; 521 seen_embedder_drag_source_ended_at_ = true;
522 EndSystemDragIfApplicable(); 522 EndSystemDragIfApplicable();
523 } 523 }
524 524
525 void BrowserPluginGuest::EndSystemDragIfApplicable() { 525 void BrowserPluginGuest::EndSystemDragIfApplicable() {
526 // Ideally we'd want either WebDragStatusDrop or WebDragStatusLeave... 526 // Ideally we'd want either WebDragStatusDrop or WebDragStatusLeave...
527 // Call guest RVH->DragSourceSystemDragEnded() correctly on the guest where 527 // Call guest RVH->DragSourceSystemDragEnded() correctly on the guest where
528 // the drag was initiated. Calling DragSourceSystemDragEnded() correctly 528 // the drag was initiated. Calling DragSourceSystemDragEnded() correctly
529 // means we call it in all cases and also make sure we only call it once. 529 // means we call it in all cases and also make sure we only call it once.
530 // This ensures that the input state of the guest stays correct, otherwise 530 // This ensures that the input state of the guest stays correct, otherwise
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
1043 range, character_bounds); 1043 range, character_bounds);
1044 } 1044 }
1045 #endif 1045 #endif
1046 1046
1047 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) { 1047 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) {
1048 if (delegate_) 1048 if (delegate_)
1049 delegate_->SetContextMenuPosition(position); 1049 delegate_->SetContextMenuPosition(position);
1050 } 1050 }
1051 1051
1052 } // namespace content 1052 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698