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

Side by Side Diff: chrome/browser/ui/webui/downloads_dom_handler.cc

Issue 352393002: Be explicit about target type in platform_util::OpenItem() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Catch up with changes to JSONStringValueSerializer and address CrOS comment Created 5 years, 9 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/ui/ash/chrome_screenshot_grabber.cc ('k') | chrome/chrome_browser.gypi » ('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/ui/webui/downloads_dom_handler.h" 5 #include "chrome/browser/ui/webui/downloads_dom_handler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 removals_.push_back(ids); 515 removals_.push_back(ids);
516 } 516 }
517 517
518 void DownloadsDOMHandler::HandleOpenDownloadsFolder( 518 void DownloadsDOMHandler::HandleOpenDownloadsFolder(
519 const base::ListValue* args) { 519 const base::ListValue* args) {
520 CountDownloadsDOMEvents(DOWNLOADS_DOM_EVENT_OPEN_FOLDER); 520 CountDownloadsDOMEvents(DOWNLOADS_DOM_EVENT_OPEN_FOLDER);
521 content::DownloadManager* manager = main_notifier_.GetManager(); 521 content::DownloadManager* manager = main_notifier_.GetManager();
522 if (manager) { 522 if (manager) {
523 platform_util::OpenItem( 523 platform_util::OpenItem(
524 Profile::FromBrowserContext(manager->GetBrowserContext()), 524 Profile::FromBrowserContext(manager->GetBrowserContext()),
525 DownloadPrefs::FromDownloadManager(manager)->DownloadPath()); 525 DownloadPrefs::FromDownloadManager(manager)->DownloadPath(),
526 platform_util::OPEN_FOLDER, platform_util::OpenOperationCallback());
526 } 527 }
527 } 528 }
528 529
529 // DownloadsDOMHandler, private: ---------------------------------------------- 530 // DownloadsDOMHandler, private: ----------------------------------------------
530 531
531 void DownloadsDOMHandler::ScheduleSendCurrentDownloads() { 532 void DownloadsDOMHandler::ScheduleSendCurrentDownloads() {
532 // Don't call SendCurrentDownloads() every time anything changes. Batch them 533 // Don't call SendCurrentDownloads() every time anything changes. Batch them
533 // together instead. This may handle hundreds of OnDownloadDestroyed() calls 534 // together instead. This may handle hundreds of OnDownloadDestroyed() calls
534 // in a single UI message loop iteration when the user Clears All downloads. 535 // in a single UI message loop iteration when the user Clears All downloads.
535 if (update_scheduled_) 536 if (update_scheduled_)
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 } 656 }
656 657
657 void DownloadsDOMHandler::CallDownloadsList(const base::ListValue& downloads) { 658 void DownloadsDOMHandler::CallDownloadsList(const base::ListValue& downloads) {
658 web_ui()->CallJavascriptFunction("downloadsList", downloads); 659 web_ui()->CallJavascriptFunction("downloadsList", downloads);
659 } 660 }
660 661
661 void DownloadsDOMHandler::CallDownloadUpdated( 662 void DownloadsDOMHandler::CallDownloadUpdated(
662 const base::ListValue& download_item) { 663 const base::ListValue& download_item) {
663 web_ui()->CallJavascriptFunction("downloadUpdated", download_item); 664 web_ui()->CallJavascriptFunction("downloadUpdated", download_item);
664 } 665 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/chrome_screenshot_grabber.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698