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

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: Fixed the issues discovered during review. 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..147adbc68722e0ca7f1319da5580c6c582ff1727 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,9 +627,16 @@ function tryDownloadUpdatedPeriodically() {
// Add handlers to HTML elements.
document.body.onload = load;
+
+function returnFalse() { return false; };
asanka 2011/07/19 18:58:00 Nit: I'll defer to Ben here, but I think having 'f
+
var clearAllLink = $('clear-all');
clearAllLink.onclick = function () { clearAll(''); };
-clearAllLink.oncontextmenu = function() { return false; };
+clearAllLink.oncontextmenu = returnFalse;
+
+var openDownloadsFolderLink = $('open-downloads-folder');
+openDownloadsFolderLink.onclick = openDownloadsFolder;
+openDownloadsFolderLink.oncontextmenu = returnFalse;
$('search-link').onclick = function () {
setSearch('');
@@ -634,4 +646,3 @@ $('search-form').onsubmit = function () {
setSearch(this.term.value);
return false;
};
-

Powered by Google App Engine
This is Rietveld 408576698