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

Issue 1051013002: Add default zoom functionality to chrome.tabs Zoom API. (Closed)

Created:
5 years, 8 months ago by wjmaclean
Modified:
5 years, 8 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org, Fady Samuel
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add default zoom functionality to chrome.tabs Zoom API. This CL adds default zoom factor functionality to the tabs zoom api. Tabs can now be set to the current default zoom via setZoom(tabId, 0) and the current default zoom level can be retrieved as a parameter default_zoom_factor in the ZoomSettings structure returned by getZoomSettings. BUG=470550 Committed: https://crrev.com/5448610da81a6438bdf2f1b0a1827c0287073f6f Cr-Commit-Position: refs/heads/master@{#323505}

Patch Set 1 #

Total comments: 13

Patch Set 2 : Address suggestions. #

Total comments: 2

Patch Set 3 : Address comments. #

Total comments: 2

Patch Set 4 : Add braces around if-clause statement. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+112 lines, -5 lines) Patch
M chrome/browser/extensions/api/tabs/tabs_api.cc View 1 2 chunks +5 lines, -1 line 0 comments Download
M chrome/browser/extensions/api/tabs/tabs_test.cc View 1 2 3 5 chunks +93 lines, -2 lines 0 comments Download
M chrome/common/extensions/api/tabs.json View 1 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/common/extensions/docs/examples/api/tabs/zoom/popup.html View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/common/extensions/docs/examples/api/tabs/zoom/popup.js View 1 2 chunks +6 lines, -1 line 0 comments Download

Messages

Total messages: 14 (3 generated)
wjmaclean
This is ready for review; please take a look?
5 years, 8 months ago (2015-04-01 18:49:55 UTC) #2
wjmaclean
Adding link to (re-)design doc: https://docs.google.com/a/chromium.org/document/d/15DWyVeK7DUCswPO5eBVTLltEONUYnR3qdOP-JpEewYA/edit#
5 years, 8 months ago (2015-04-01 18:51:06 UTC) #3
not at google - send to devlin
https://codereview.chromium.org/1051013002/diff/1/chrome/browser/extensions/api/tabs/tabs_api.cc File chrome/browser/extensions/api/tabs/tabs_api.cc (right): https://codereview.chromium.org/1051013002/diff/1/chrome/browser/extensions/api/tabs/tabs_api.cc#newcode1960 chrome/browser/extensions/api/tabs/tabs_api.cc:1960: content::ZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel()); Simpler to write this as just 1 statement: ...
5 years, 8 months ago (2015-04-01 20:34:07 UTC) #4
wjmaclean
Comments addressed, ptal? https://codereview.chromium.org/1051013002/diff/1/chrome/browser/extensions/api/tabs/tabs_api.cc File chrome/browser/extensions/api/tabs/tabs_api.cc (right): https://codereview.chromium.org/1051013002/diff/1/chrome/browser/extensions/api/tabs/tabs_api.cc#newcode1960 chrome/browser/extensions/api/tabs/tabs_api.cc:1960: content::ZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel()); On 2015/04/01 20:34:07, kalman wrote: ...
5 years, 8 months ago (2015-04-01 21:23:24 UTC) #5
not at google - send to devlin
lg with a last couple of test nits. https://codereview.chromium.org/1051013002/diff/1/chrome/browser/extensions/api/tabs/tabs_test.cc File chrome/browser/extensions/api/tabs/tabs_test.cc (right): https://codereview.chromium.org/1051013002/diff/1/chrome/browser/extensions/api/tabs/tabs_test.cc#newcode892 chrome/browser/extensions/api/tabs/tabs_test.cc:892: EXPECT_NEAR(zoom_controller->GetDefaultZoomLevel(), ...
5 years, 8 months ago (2015-04-01 22:26:12 UTC) #6
wjmaclean
PTAL? Your suggestion of a function to document the issue with comparing zoom levels reminded ...
5 years, 8 months ago (2015-04-02 12:03:14 UTC) #7
not at google - send to devlin
lgtm https://codereview.chromium.org/1051013002/diff/40001/chrome/browser/extensions/api/tabs/tabs_test.cc File chrome/browser/extensions/api/tabs/tabs_test.cc (right): https://codereview.chromium.org/1051013002/diff/40001/chrome/browser/extensions/api/tabs/tabs_test.cc#newcode798 chrome/browser/extensions/api/tabs/tabs_test.cc:798: << "default zoom factor not found in result"; ...
5 years, 8 months ago (2015-04-02 14:41:21 UTC) #8
wjmaclean
Thanks! https://codereview.chromium.org/1051013002/diff/40001/chrome/browser/extensions/api/tabs/tabs_test.cc File chrome/browser/extensions/api/tabs/tabs_test.cc (right): https://codereview.chromium.org/1051013002/diff/40001/chrome/browser/extensions/api/tabs/tabs_test.cc#newcode798 chrome/browser/extensions/api/tabs/tabs_test.cc:798: << "default zoom factor not found in result"; ...
5 years, 8 months ago (2015-04-02 14:59:24 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1051013002/60001
5 years, 8 months ago (2015-04-02 15:01:04 UTC) #12
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 8 months ago (2015-04-02 16:21:41 UTC) #13
commit-bot: I haz the power
5 years, 8 months ago (2015-04-03 20:26:18 UTC) #14
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/5448610da81a6438bdf2f1b0a1827c0287073f6f
Cr-Commit-Position: refs/heads/master@{#323505}

Powered by Google App Engine
This is Rietveld 408576698