Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Side by Side Diff: chrome/browser/ui/cocoa/download/download_util_mac.mm

Issue 7618048: Move the core download files to content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ui/cocoa/download/download_util_mac.h" 7 #include "chrome/browser/ui/cocoa/download/download_util_mac.h"
8 8
9 #include "base/sys_string_conversions.h" 9 #include "base/sys_string_conversions.h"
10 #include "chrome/browser/download/download_item.h"
11 #include "chrome/browser/download/download_manager.h"
12 #import "chrome/browser/ui/cocoa/dock_icon.h" 10 #import "chrome/browser/ui/cocoa/dock_icon.h"
11 #include "content/browser/download/download_item.h"
12 #include "content/browser/download/download_manager.h"
13 #include "ui/gfx/image/image.h" 13 #include "ui/gfx/image/image.h"
14 #include "ui/gfx/native_widget_types.h" 14 #include "ui/gfx/native_widget_types.h"
15 15
16 namespace download_util { 16 namespace download_util {
17 17
18 void AddFileToPasteboard(NSPasteboard* pasteboard, const FilePath& path) { 18 void AddFileToPasteboard(NSPasteboard* pasteboard, const FilePath& path) {
19 // Write information about the file being dragged to the pasteboard. 19 // Write information about the file being dragged to the pasteboard.
20 NSString* file = base::SysUTF8ToNSString(path.value()); 20 NSString* file = base::SysUTF8ToNSString(path.value());
21 NSArray* fileList = [NSArray arrayWithObject:file]; 21 NSArray* fileList = [NSArray arrayWithObject:file];
22 [pasteboard declareTypes:[NSArray arrayWithObject:NSFilenamesPboardType] 22 [pasteboard declareTypes:[NSArray arrayWithObject:NSFilenamesPboardType]
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 bool progress_known, 71 bool progress_known,
72 float progress) { 72 float progress) {
73 DockIcon* dock_icon = [DockIcon sharedDockIcon]; 73 DockIcon* dock_icon = [DockIcon sharedDockIcon];
74 [dock_icon setDownloads:download_count]; 74 [dock_icon setDownloads:download_count];
75 [dock_icon setIndeterminate:!progress_known]; 75 [dock_icon setIndeterminate:!progress_known];
76 [dock_icon setProgress:progress]; 76 [dock_icon setProgress:progress];
77 [dock_icon updateIcon]; 77 [dock_icon updateIcon];
78 } 78 }
79 79
80 } // namespace download_util 80 } // namespace download_util
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698