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

Issue 1026223002: OOP PDF: Do not call setZoom in response to an onZoomChange event. (Closed)

Created:
5 years, 9 months ago by Sam McNally
Modified:
5 years, 8 months ago
Reviewers:
Lei Zhang, raymes
CC:
chromium-reviews, arv+watch_chromium.org, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

OOP PDF: Do not call setZoom in response to an onZoomChange event. Previously, the PDF extension called chrome.tabs.setZoom in response to chrome.tabs.onZoomChange events received while a setZoom call was not in progress. This setZoom call unnecessarily requested the zoom be set to the current zoom value. Prior to another fix, this sometimes caused the zoom indicator bubble to flicker. This CL refactors the logic for when to call chrome.tabs.setZoom into a separate, tested class that doesn't call setZoom in response to onZoomChange events. Committed: https://crrev.com/3e4104f7c8ccbb8987fcbde71c1402e123d2cb13 Cr-Commit-Position: refs/heads/master@{#324570}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 14

Patch Set 4 : rebase #

Patch Set 5 : #

Total comments: 2

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+248 lines, -41 lines) Patch
M chrome/browser/pdf/pdf_extension_test.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/resources/component_extension_resources.grd View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/resources/pdf/index.html View 1 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/resources/pdf/index-material.html View 1 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/resources/pdf/pdf.js View 1 2 3 3 chunks +17 lines, -41 lines 0 comments Download
A chrome/browser/resources/pdf/zoom_manager.js View 1 2 3 4 5 1 chunk +83 lines, -0 lines 0 comments Download
A chrome/test/data/pdf/zoom_manager_test.js View 1 2 3 4 1 chunk +141 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (9 generated)
Sam McNally
5 years, 9 months ago (2015-03-24 03:41:39 UTC) #2
Sam McNally
Refactored browser zoom management out into a separate class as discussed.
5 years, 9 months ago (2015-03-25 07:44:24 UTC) #5
Sam McNally
ping
5 years, 8 months ago (2015-04-07 06:59:22 UTC) #6
raymes
Looks great, thank you!! https://codereview.chromium.org/1026223002/diff/80001/chrome/browser/resources/pdf/pdf.js File chrome/browser/resources/pdf/pdf.js (right): https://codereview.chromium.org/1026223002/diff/80001/chrome/browser/resources/pdf/pdf.js#newcode187 chrome/browser/resources/pdf/pdf.js:187: return; Do you think we ...
5 years, 8 months ago (2015-04-09 03:40:01 UTC) #7
Sam McNally
https://codereview.chromium.org/1026223002/diff/80001/chrome/browser/resources/pdf/pdf.js File chrome/browser/resources/pdf/pdf.js (right): https://codereview.chromium.org/1026223002/diff/80001/chrome/browser/resources/pdf/pdf.js#newcode187 chrome/browser/resources/pdf/pdf.js:187: return; On 2015/04/09 03:40:01, raymes wrote: > Do you ...
5 years, 8 months ago (2015-04-09 08:24:41 UTC) #11
raymes
lgtm! https://codereview.chromium.org/1026223002/diff/180001/chrome/browser/resources/pdf/zoom_manager.js File chrome/browser/resources/pdf/zoom_manager.js (right): https://codereview.chromium.org/1026223002/diff/180001/chrome/browser/resources/pdf/zoom_manager.js#newcode51 chrome/browser/resources/pdf/zoom_manager.js:51: // zoom level matches the most-recently-sent zoom level. ...
5 years, 8 months ago (2015-04-09 23:56:42 UTC) #12
Sam McNally
+thestig for chrome/browser/resources/component_extension_resources.grd https://codereview.chromium.org/1026223002/diff/180001/chrome/browser/resources/pdf/zoom_manager.js File chrome/browser/resources/pdf/zoom_manager.js (right): https://codereview.chromium.org/1026223002/diff/180001/chrome/browser/resources/pdf/zoom_manager.js#newcode51 chrome/browser/resources/pdf/zoom_manager.js:51: // zoom level matches the most-recently-sent ...
5 years, 8 months ago (2015-04-10 00:02:02 UTC) #14
Lei Zhang
lgtm
5 years, 8 months ago (2015-04-10 00:11:42 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1026223002/200001
5 years, 8 months ago (2015-04-10 00:13:29 UTC) #18
commit-bot: I haz the power
Committed patchset #6 (id:200001)
5 years, 8 months ago (2015-04-10 01:48:43 UTC) #19
commit-bot: I haz the power
5 years, 8 months ago (2015-04-10 01:49:35 UTC) #20
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/3e4104f7c8ccbb8987fcbde71c1402e123d2cb13
Cr-Commit-Position: refs/heads/master@{#324570}

Powered by Google App Engine
This is Rietveld 408576698