| OLD | NEW |
| 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/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 @interface WebDragSource(Private) | 95 @interface WebDragSource(Private) |
| 96 | 96 |
| 97 - (void)fillPasteboard; | 97 - (void)fillPasteboard; |
| 98 - (NSImage*)dragImage; | 98 - (NSImage*)dragImage; |
| 99 | 99 |
| 100 @end // @interface WebDragSource(Private) | 100 @end // @interface WebDragSource(Private) |
| 101 | 101 |
| 102 | 102 |
| 103 @implementation WebDragSource | 103 @implementation WebDragSource |
| 104 | 104 |
| 105 - (id)initWithContents:(WebContentsImpl*)contents | 105 - (id)initWithContents:(content::WebContentsImpl*)contents |
| 106 view:(NSView*)contentsView | 106 view:(NSView*)contentsView |
| 107 dropData:(const WebDropData*)dropData | 107 dropData:(const WebDropData*)dropData |
| 108 image:(NSImage*)image | 108 image:(NSImage*)image |
| 109 offset:(NSPoint)offset | 109 offset:(NSPoint)offset |
| 110 pasteboard:(NSPasteboard*)pboard | 110 pasteboard:(NSPasteboard*)pboard |
| 111 dragOperationMask:(NSDragOperation)dragOperationMask { | 111 dragOperationMask:(NSDragOperation)dragOperationMask { |
| 112 if ((self = [super init])) { | 112 if ((self = [super init])) { |
| 113 contents_ = contents; | 113 contents_ = contents; |
| 114 DCHECK(contents_); | 114 DCHECK(contents_); |
| 115 | 115 |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 - (NSImage*)dragImage { | 464 - (NSImage*)dragImage { |
| 465 if (dragImage_) | 465 if (dragImage_) |
| 466 return dragImage_; | 466 return dragImage_; |
| 467 | 467 |
| 468 // Default to returning a generic image. | 468 // Default to returning a generic image. |
| 469 return content::GetContentClient()->GetNativeImageNamed( | 469 return content::GetContentClient()->GetNativeImageNamed( |
| 470 IDR_DEFAULT_FAVICON).ToNSImage(); | 470 IDR_DEFAULT_FAVICON).ToNSImage(); |
| 471 } | 471 } |
| 472 | 472 |
| 473 @end // @implementation WebDragSource (Private) | 473 @end // @implementation WebDragSource (Private) |
| OLD | NEW |