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

Side by Side Diff: content/browser/web_contents/web_contents_view_mac.mm

Issue 2580843003: Prevent drag-and-drop events from firing over cross-site, same-page frames. (Mac) (Closed)
Patch Set: Addressed grammar nits. Created 4 years 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/web_contents/web_drag_dest_mac.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 #import <Carbon/Carbon.h> 5 #import <Carbon/Carbon.h>
6 6
7 #import "content/browser/web_contents/web_contents_view_mac.h" 7 #import "content/browser/web_contents/web_contents_view_mac.h"
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 forType:type]; 542 forType:type];
543 } 543 }
544 544
545 - (void)startDragWithDropData:(const DropData&)dropData 545 - (void)startDragWithDropData:(const DropData&)dropData
546 sourceRWH:(content::RenderWidgetHostImpl*)sourceRWH 546 sourceRWH:(content::RenderWidgetHostImpl*)sourceRWH
547 dragOperationMask:(NSDragOperation)operationMask 547 dragOperationMask:(NSDragOperation)operationMask
548 image:(NSImage*)image 548 image:(NSImage*)image
549 offset:(NSPoint)offset { 549 offset:(NSPoint)offset {
550 if (![self webContents]) 550 if (![self webContents])
551 return; 551 return;
552 [dragDest_ setDragStartTrackersForProcess:sourceRWH->GetProcess()->GetID()];
552 dragSource_.reset([[WebDragSource alloc] 553 dragSource_.reset([[WebDragSource alloc]
553 initWithContents:[self webContents] 554 initWithContents:[self webContents]
554 view:self 555 view:self
555 dropData:&dropData 556 dropData:&dropData
556 sourceRWH:sourceRWH 557 sourceRWH:sourceRWH
557 image:image 558 image:image
558 offset:offset 559 offset:offset
559 pasteboard:[NSPasteboard pasteboardWithName:NSDragPboard] 560 pasteboard:[NSPasteboard pasteboardWithName:NSDragPboard]
560 dragOperationMask:operationMask]); 561 dragOperationMask:operationMask]);
561 [dragSource_ startDrag]; 562 [dragSource_ startDrag];
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 724
724 - (void)viewDidHide { 725 - (void)viewDidHide {
725 [self updateWebContentsVisibility]; 726 [self updateWebContentsVisibility];
726 } 727 }
727 728
728 - (void)viewDidUnhide { 729 - (void)viewDidUnhide {
729 [self updateWebContentsVisibility]; 730 [self updateWebContentsVisibility];
730 } 731 }
731 732
732 @end 733 @end
OLDNEW
« no previous file with comments | « no previous file | content/browser/web_contents/web_drag_dest_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698