| 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 13 matching lines...) Expand all Loading... |
| 24 #include "content/public/common/content_client.h" | 24 #include "content/public/common/content_client.h" |
| 25 #include "content/public/common/url_constants.h" | 25 #include "content/public/common/url_constants.h" |
| 26 #include "grit/ui_resources.h" | 26 #include "grit/ui_resources.h" |
| 27 #include "net/base/escape.h" | 27 #include "net/base/escape.h" |
| 28 #include "net/base/file_stream.h" | 28 #include "net/base/file_stream.h" |
| 29 #include "net/base/mime_util.h" | 29 #include "net/base/mime_util.h" |
| 30 #include "net/base/net_util.h" | 30 #include "net/base/net_util.h" |
| 31 #include "ui/base/clipboard/custom_data_helper.h" | 31 #include "ui/base/clipboard/custom_data_helper.h" |
| 32 #include "ui/base/dragdrop/cocoa_dnd_util.h" | 32 #include "ui/base/dragdrop/cocoa_dnd_util.h" |
| 33 #include "ui/gfx/image/image.h" | 33 #include "ui/gfx/image/image.h" |
| 34 #include "ui/gfx/mac/nsimage_cache.h" | |
| 35 #include "webkit/glue/webdropdata.h" | 34 #include "webkit/glue/webdropdata.h" |
| 36 | 35 |
| 37 using base::SysNSStringToUTF8; | 36 using base::SysNSStringToUTF8; |
| 38 using base::SysUTF8ToNSString; | 37 using base::SysUTF8ToNSString; |
| 39 using base::SysUTF16ToNSString; | 38 using base::SysUTF16ToNSString; |
| 40 using content::BrowserThread; | 39 using content::BrowserThread; |
| 41 using content::DragDownloadFile; | 40 using content::DragDownloadFile; |
| 42 using content::PromiseFileFinalizer; | 41 using content::PromiseFileFinalizer; |
| 43 using content::RenderViewHostImpl; | 42 using content::RenderViewHostImpl; |
| 44 using net::FileStream; | 43 using net::FileStream; |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 - (NSImage*)dragImage { | 461 - (NSImage*)dragImage { |
| 463 if (dragImage_) | 462 if (dragImage_) |
| 464 return dragImage_; | 463 return dragImage_; |
| 465 | 464 |
| 466 // Default to returning a generic image. | 465 // Default to returning a generic image. |
| 467 return content::GetContentClient()->GetNativeImageNamed( | 466 return content::GetContentClient()->GetNativeImageNamed( |
| 468 IDR_DEFAULT_FAVICON).ToNSImage(); | 467 IDR_DEFAULT_FAVICON).ToNSImage(); |
| 469 } | 468 } |
| 470 | 469 |
| 471 @end // @implementation WebDragSource (Private) | 470 @end // @implementation WebDragSource (Private) |
| OLD | NEW |