OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/browser/cocoa/web_drag_source.h" | 5 #import "chrome/browser/cocoa/web_drag_source.h" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/nsimage_cache_mac.h" |
8 #include "base/string_util.h" | 9 #include "base/string_util.h" |
9 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
10 #include "base/task.h" | 11 #include "base/task.h" |
11 #include "base/thread.h" | 12 #include "base/thread.h" |
12 #include "chrome/browser/browser_process.h" | 13 #include "chrome/browser/browser_process.h" |
13 #include "chrome/browser/cocoa/nsimage_cache.h" | |
14 #include "chrome/browser/renderer_host/render_view_host.h" | 14 #include "chrome/browser/renderer_host/render_view_host.h" |
15 #include "chrome/browser/tab_contents/tab_contents.h" | 15 #include "chrome/browser/tab_contents/tab_contents.h" |
16 #include "chrome/browser/tab_contents/tab_contents_view_mac.h" | 16 #include "chrome/browser/tab_contents/tab_contents_view_mac.h" |
17 #include "net/base/file_stream.h" | 17 #include "net/base/file_stream.h" |
18 #include "net/base/net_errors.h" | 18 #include "net/base/net_errors.h" |
19 #include "net/base/net_util.h" | 19 #include "net/base/net_util.h" |
20 #import "third_party/mozilla/include/NSPasteboard+Utils.h" | 20 #import "third_party/mozilla/include/NSPasteboard+Utils.h" |
21 #include "webkit/glue/webdropdata.h" | 21 #include "webkit/glue/webdropdata.h" |
22 | 22 |
23 using base::SysNSStringToUTF8; | 23 using base::SysNSStringToUTF8; |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 if (!dropData_->plain_text.empty()) | 357 if (!dropData_->plain_text.empty()) |
358 [pasteboard_ addTypes:[NSArray arrayWithObject:NSStringPboardType] | 358 [pasteboard_ addTypes:[NSArray arrayWithObject:NSStringPboardType] |
359 owner:contentsView_]; | 359 owner:contentsView_]; |
360 } | 360 } |
361 | 361 |
362 - (NSImage*)dragImage { | 362 - (NSImage*)dragImage { |
363 return MakeDragImage(dropData_.get()); | 363 return MakeDragImage(dropData_.get()); |
364 } | 364 } |
365 | 365 |
366 @end // @implementation WebDragSource (Private) | 366 @end // @implementation WebDragSource (Private) |
OLD | NEW |