| 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/tab_contents/web_drag_source_mac.h" | 5 #import "content/browser/tab_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 14 matching lines...) Expand all Loading... |
| 25 #include "net/base/file_stream.h" | 25 #include "net/base/file_stream.h" |
| 26 #include "net/base/net_util.h" | 26 #include "net/base/net_util.h" |
| 27 #include "ui/base/clipboard/custom_data_helper.h" | 27 #include "ui/base/clipboard/custom_data_helper.h" |
| 28 #include "ui/gfx/mac/nsimage_cache.h" | 28 #include "ui/gfx/mac/nsimage_cache.h" |
| 29 #include "webkit/glue/webdropdata.h" | 29 #include "webkit/glue/webdropdata.h" |
| 30 | 30 |
| 31 using base::SysNSStringToUTF8; | 31 using base::SysNSStringToUTF8; |
| 32 using base::SysUTF8ToNSString; | 32 using base::SysUTF8ToNSString; |
| 33 using base::SysUTF16ToNSString; | 33 using base::SysUTF16ToNSString; |
| 34 using content::BrowserThread; | 34 using content::BrowserThread; |
| 35 using content::RenderViewHostImpl; |
| 35 using net::FileStream; | 36 using net::FileStream; |
| 36 | 37 |
| 37 namespace { | 38 namespace { |
| 38 | 39 |
| 39 // An unofficial standard pasteboard title type to be provided alongside the | 40 // An unofficial standard pasteboard title type to be provided alongside the |
| 40 // |NSURLPboardType|. | 41 // |NSURLPboardType|. |
| 41 NSString* const kNSURLTitlePboardType = @"public.url-name"; | 42 NSString* const kNSURLTitlePboardType = @"public.url-name"; |
| 42 | 43 |
| 43 // Converts a string16 into a FilePath. Use this method instead of | 44 // Converts a string16 into a FilePath. Use this method instead of |
| 44 // -[NSString fileSystemRepresentation] to prevent exceptions from being thrown. | 45 // -[NSString fileSystemRepresentation] to prevent exceptions from being thrown. |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 | 444 |
| 444 - (NSImage*)dragImage { | 445 - (NSImage*)dragImage { |
| 445 if (dragImage_) | 446 if (dragImage_) |
| 446 return dragImage_; | 447 return dragImage_; |
| 447 | 448 |
| 448 // Default to returning a generic image. | 449 // Default to returning a generic image. |
| 449 return gfx::GetCachedImageWithName(@"nav.pdf"); | 450 return gfx::GetCachedImageWithName(@"nav.pdf"); |
| 450 } | 451 } |
| 451 | 452 |
| 452 @end // @implementation WebDragSource (Private) | 453 @end // @implementation WebDragSource (Private) |
| OLD | NEW |