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

Unified Diff: chrome/browser/resources/downloads.js

Issue 7398026: Added a link to the downloads tab that opens the downloads folder. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Added a period at the end of a comment. Created 9 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/downloads.js
diff --git a/chrome/browser/resources/downloads.js b/chrome/browser/resources/downloads.js
index c2475494c67b21741cdcb8e129ff4c37f200da8c..dbdda2998e688c699a0f9d9618168145e2e29eb0 100644
--- a/chrome/browser/resources/downloads.js
+++ b/chrome/browser/resources/downloads.js
@@ -575,6 +575,11 @@ function clearAll() {
return false;
}
+function openDownloadsFolder() {
+ chrome.send('openDownloadsFolder');
+ return false;
+}
+
///////////////////////////////////////////////////////////////////////////////
// Chrome callbacks:
/**
@@ -622,10 +627,15 @@ function tryDownloadUpdatedPeriodically() {
// Add handlers to HTML elements.
document.body.onload = load;
+
var clearAllLink = $('clear-all');
clearAllLink.onclick = function () { clearAll(''); };
clearAllLink.oncontextmenu = function() { return false; };
+var openDownloadsFolderLink = $('open-downloads-folder');
+openDownloadsFolderLink.onclick = openDownloadsFolder;
+openDownloadsFolderLink.oncontextmenu = function() { return false; };
+
$('search-link').onclick = function () {
setSearch('');
return false;
@@ -634,4 +644,3 @@ $('search-form').onsubmit = function () {
setSearch(this.term.value);
return false;
};
-

Powered by Google App Engine
This is Rietveld 408576698