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

Side by Side Diff: chrome/browser/dom_ui/downloads_ui.cc

Issue 55046: Installing extensions (drag/drop, download crx file) will now be... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 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 | « no previous file | chrome/browser/download/download_file.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/dom_ui/downloads_ui.h" 5 #include "chrome/browser/dom_ui/downloads_ui.h"
6 6
7 #include "base/gfx/png_encoder.h" 7 #include "base/gfx/png_encoder.h"
8 #include "base/string_piece.h" 8 #include "base/string_piece.h"
9 #include "base/thread.h" 9 #include "base/thread.h"
10 #include "base/time_format.h" 10 #include "base/time_format.h"
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 ClearDownloadItems(); 308 ClearDownloadItems();
309 download_manager_->GetDownloads(this, search_text_); 309 download_manager_->GetDownloads(this, search_text_);
310 } else { 310 } else {
311 SendCurrentDownloads(); 311 SendCurrentDownloads();
312 } 312 }
313 } 313 }
314 314
315 void DownloadsDOMHandler::HandleOpenFile(const Value* value) { 315 void DownloadsDOMHandler::HandleOpenFile(const Value* value) {
316 DownloadItem* file = GetDownloadByValue(value); 316 DownloadItem* file = GetDownloadByValue(value);
317 if (file) 317 if (file)
318 download_manager_->OpenDownloadInShell(file, NULL); 318 download_manager_->OpenDownload(file, NULL);
319 } 319 }
320 320
321 void DownloadsDOMHandler::HandleDrag(const Value* value) { 321 void DownloadsDOMHandler::HandleDrag(const Value* value) {
322 DownloadItem* file = GetDownloadByValue(value); 322 DownloadItem* file = GetDownloadByValue(value);
323 if (file) { 323 if (file) {
324 IconManager* im = g_browser_process->icon_manager(); 324 IconManager* im = g_browser_process->icon_manager();
325 SkBitmap* icon = im->LookupIcon(file->full_path().ToWStringHack(), 325 SkBitmap* icon = im->LookupIcon(file->full_path().ToWStringHack(),
326 IconLoader::NORMAL); 326 IconLoader::NORMAL);
327 download_util::DragDownload(file, icon); 327 download_util::DragDownload(file, icon);
328 } 328 }
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 handler->Init(); 504 handler->Init();
505 505
506 DownloadsUIHTMLSource* html_source = new DownloadsUIHTMLSource(); 506 DownloadsUIHTMLSource* html_source = new DownloadsUIHTMLSource();
507 507
508 // Set up the chrome-ui://downloads/ source. 508 // Set up the chrome-ui://downloads/ source.
509 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, 509 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE,
510 NewRunnableMethod(&chrome_url_data_manager, 510 NewRunnableMethod(&chrome_url_data_manager,
511 &ChromeURLDataManager::AddDataSource, 511 &ChromeURLDataManager::AddDataSource,
512 html_source)); 512 html_source));
513 } 513 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/download/download_file.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698