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

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

Issue 63253002: Rename WebKit namespace to blink (part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
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 "content/browser/web_contents/web_drag_source_mac.h" 5 #import "content/browser/web_contents/web_drag_source_mac.h"
6 6
7 #include <sys/param.h> 7 #include <sys/param.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 NSRect screenFrame = [[[contentsView_ window] screen] frame]; 278 NSRect screenFrame = [[[contentsView_ window] screen] frame];
279 screenPoint.y = screenFrame.size.height - screenPoint.y; 279 screenPoint.y = screenFrame.size.height - screenPoint.y;
280 280
281 // If AppKit returns a copy and move operation, mask off the move bit 281 // If AppKit returns a copy and move operation, mask off the move bit
282 // because WebCore does not understand what it means to do both, which 282 // because WebCore does not understand what it means to do both, which
283 // results in an assertion failure/renderer crash. 283 // results in an assertion failure/renderer crash.
284 if (operation == (NSDragOperationMove | NSDragOperationCopy)) 284 if (operation == (NSDragOperationMove | NSDragOperationCopy))
285 operation &= ~NSDragOperationMove; 285 operation &= ~NSDragOperationMove;
286 286
287 contents_->DragSourceEndedAt(localPoint.x, localPoint.y, screenPoint.x, 287 contents_->DragSourceEndedAt(localPoint.x, localPoint.y, screenPoint.x,
288 screenPoint.y, static_cast<WebKit::WebDragOperation>(operation)); 288 screenPoint.y, static_cast<blink::WebDragOperation>(operation));
289 } 289 }
290 290
291 // Make sure the pasteboard owner isn't us. 291 // Make sure the pasteboard owner isn't us.
292 [pasteboard_ declareTypes:[NSArray array] owner:nil]; 292 [pasteboard_ declareTypes:[NSArray array] owner:nil];
293 } 293 }
294 294
295 - (void)moveDragTo:(NSPoint)screenPoint { 295 - (void)moveDragTo:(NSPoint)screenPoint {
296 if (!contents_) 296 if (!contents_)
297 return; 297 return;
298 RenderViewHostImpl* rvh = static_cast<RenderViewHostImpl*>( 298 RenderViewHostImpl* rvh = static_cast<RenderViewHostImpl*>(
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 - (NSImage*)dragImage { 480 - (NSImage*)dragImage {
481 if (dragImage_) 481 if (dragImage_)
482 return dragImage_; 482 return dragImage_;
483 483
484 // Default to returning a generic image. 484 // Default to returning a generic image.
485 return content::GetContentClient()->GetNativeImageNamed( 485 return content::GetContentClient()->GetNativeImageNamed(
486 IDR_DEFAULT_FAVICON).ToNSImage(); 486 IDR_DEFAULT_FAVICON).ToNSImage();
487 } 487 }
488 488
489 @end // @implementation WebDragSource (Private) 489 @end // @implementation WebDragSource (Private)
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_drag_source_gtk.cc ('k') | content/browser/web_contents/web_drag_source_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698