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

Unified Diff: chrome/browser/resources/pdf/browser_api.js

Issue 2915773003: PDF Plugin: Add compile targets for a few more files. (Closed)
Patch Set: Addressing comments. Created 3 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/resources/pdf/compiled_resources2.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/pdf/browser_api.js
diff --git a/chrome/browser/resources/pdf/browser_api.js b/chrome/browser/resources/pdf/browser_api.js
index c29559a55b91f94398ca746a6117b2d682e4935f..8b5ef4472132ba1eee949769597b2958ab2ce8cb 100644
--- a/chrome/browser/resources/pdf/browser_api.js
+++ b/chrome/browser/resources/pdf/browser_api.js
@@ -136,7 +136,7 @@ class BrowserApi {
/**
* Adds an event listener to be notified when the browser zoom changes.
- * @param {function} listener The listener to be called with the new zoom
+ * @param {!Function} listener The listener to be called with the new zoom
* factor.
*/
addZoomEventListener(listener) {
@@ -144,7 +144,9 @@ class BrowserApi {
this.zoomBehavior_ == BrowserApi.ZoomBehavior.PROPAGATE_PARENT))
return;
- chrome.tabs.onZoomChange.addListener(function(zoomChangeInfo) {
+ chrome.tabs.onZoomChange.addListener(function(info) {
+ var zoomChangeInfo =
+ /** @type {{tabId: number, newZoomFactor: number}} */ (info);
if (zoomChangeInfo.tabId != this.streamInfo_.tabId)
return;
listener(zoomChangeInfo.newZoomFactor);
« no previous file with comments | « no previous file | chrome/browser/resources/pdf/compiled_resources2.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698