OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/ui/cocoa/web_drag_source.h" | 5 #import "chrome/browser/ui/cocoa/web_drag_source.h" |
6 | 6 |
| 7 #include "app/mac/nsimage_cache.h" |
7 #include "base/file_path.h" | 8 #include "base/file_path.h" |
8 #include "base/nsimage_cache_mac.h" | |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
11 #include "base/task.h" | 11 #include "base/task.h" |
12 #include "base/thread.h" | 12 #include "base/thread.h" |
13 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
14 #include "chrome/browser/browser_process.h" | 14 #include "chrome/browser/browser_process.h" |
15 #include "chrome/browser/download/download_manager.h" | 15 #include "chrome/browser/download/download_manager.h" |
16 #include "chrome/browser/download/download_util.h" | 16 #include "chrome/browser/download/download_util.h" |
17 #include "chrome/browser/download/drag_download_file.h" | 17 #include "chrome/browser/download/drag_download_file.h" |
18 #include "chrome/browser/download/drag_download_util.h" | 18 #include "chrome/browser/download/drag_download_util.h" |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 if (!dropData_->plain_text.empty()) | 399 if (!dropData_->plain_text.empty()) |
400 [pasteboard_ addTypes:[NSArray arrayWithObject:NSStringPboardType] | 400 [pasteboard_ addTypes:[NSArray arrayWithObject:NSStringPboardType] |
401 owner:contentsView_]; | 401 owner:contentsView_]; |
402 } | 402 } |
403 | 403 |
404 - (NSImage*)dragImage { | 404 - (NSImage*)dragImage { |
405 if (dragImage_) | 405 if (dragImage_) |
406 return dragImage_; | 406 return dragImage_; |
407 | 407 |
408 // Default to returning a generic image. | 408 // Default to returning a generic image. |
409 return nsimage_cache::ImageNamed(@"nav.pdf"); | 409 return app::mac::GetCachedImageWithName::ImageNamed(@"nav.pdf"); |
410 } | 410 } |
411 | 411 |
412 @end // @implementation WebDragSource (Private) | 412 @end // @implementation WebDragSource (Private) |
OLD | NEW |