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 // Download utility implementation for Mac OS X. | 5 // Download utility implementation for Mac OS X. |
6 | 6 |
7 #include "chrome/browser/cocoa/download_util_mac.h" | 7 #include "chrome/browser/cocoa/download_util_mac.h" |
8 | 8 |
9 #include "base/gfx/native_widget_types.h" | 9 #include "app/gfx/native_widget_types.h" |
10 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
11 #include "chrome/browser/download/download_manager.h" | 11 #include "chrome/browser/download/download_manager.h" |
12 #include "skia/ext/skia_utils_mac.h" | 12 #include "skia/ext/skia_utils_mac.h" |
13 | 13 |
14 namespace download_util { | 14 namespace download_util { |
15 | 15 |
16 void AddFileToPasteboard(NSPasteboard* pasteboard, const FilePath& path) { | 16 void AddFileToPasteboard(NSPasteboard* pasteboard, const FilePath& path) { |
17 // Write information about the file being dragged to the pasteboard. | 17 // Write information about the file being dragged to the pasteboard. |
18 NSString* file = base::SysWideToNSString(path.ToWStringHack()); | 18 NSString* file = base::SysWideToNSString(path.ToWStringHack()); |
19 NSArray* fileList = [NSArray arrayWithObject:file]; | 19 NSArray* fileList = [NSArray arrayWithObject:file]; |
(...skipping 29 matching lines...) Expand all Loading... |
49 [[view window] dragImage:dragImage | 49 [[view window] dragImage:dragImage |
50 at:position | 50 at:position |
51 offset:NSZeroSize | 51 offset:NSZeroSize |
52 event:dragEvent | 52 event:dragEvent |
53 pasteboard:pasteboard | 53 pasteboard:pasteboard |
54 source:view | 54 source:view |
55 slideBack:YES]; | 55 slideBack:YES]; |
56 } | 56 } |
57 | 57 |
58 } // namespace download_util | 58 } // namespace download_util |
OLD | NEW |