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

Side by Side Diff: chrome/browser/download/download_extension_api.cc

Issue 10453101: Convert most of the rest of chrome to ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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
« no previous file with comments | « chrome/browser/custom_home_pages_table_model.h ('k') | chrome/browser/download/download_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "chrome/browser/download/download_extension_api.h" 5 #include "chrome/browser/download/download_extension_api.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cctype> 8 #include <cctype>
9 #include <iterator> 9 #include <iterator>
10 #include <set> 10 #include <set>
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 base::Unretained(this))); 242 base::Unretained(this)));
243 return true; 243 return true;
244 } 244 }
245 245
246 void DownloadFileIconExtractorImpl::OnIconLoadComplete( 246 void DownloadFileIconExtractorImpl::OnIconLoadComplete(
247 IconManager::Handle handle, 247 IconManager::Handle handle,
248 gfx::Image* icon) { 248 gfx::Image* icon) {
249 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 249 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
250 std::string url; 250 std::string url;
251 if (icon) 251 if (icon)
252 url = web_ui_util::GetImageDataUrl(*icon->ToSkBitmap()); 252 url = web_ui_util::GetImageDataUrl(*icon->ToImageSkia());
253 callback_.Run(url); 253 callback_.Run(url);
254 } 254 }
255 255
256 IconLoader::IconSize IconLoaderSizeFromPixelSize(int pixel_size) { 256 IconLoader::IconSize IconLoaderSizeFromPixelSize(int pixel_size) {
257 switch (pixel_size) { 257 switch (pixel_size) {
258 case 16: return IconLoader::SMALL; 258 case 16: return IconLoader::SMALL;
259 case 32: return IconLoader::NORMAL; 259 case 32: return IconLoader::NORMAL;
260 default: 260 default:
261 NOTREACHED(); 261 NOTREACHED();
262 return IconLoader::NORMAL; 262 return IconLoader::NORMAL;
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
1112 ListValue args; 1112 ListValue args;
1113 args.Append(arg); 1113 args.Append(arg);
1114 std::string json_args; 1114 std::string json_args;
1115 base::JSONWriter::Write(&args, &json_args); 1115 base::JSONWriter::Write(&args, &json_args);
1116 profile_->GetExtensionEventRouter()->DispatchEventToRenderers( 1116 profile_->GetExtensionEventRouter()->DispatchEventToRenderers(
1117 event_name, 1117 event_name,
1118 json_args, 1118 json_args,
1119 profile_, 1119 profile_,
1120 GURL()); 1120 GURL());
1121 } 1121 }
OLDNEW
« no previous file with comments | « chrome/browser/custom_home_pages_table_model.h ('k') | chrome/browser/download/download_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698