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

Issue 301733006: Zoom Extension API (chrome) (Closed)

Created:
6 years, 6 months ago by wjmaclean
Modified:
6 years, 5 months ago
CC:
chromium-reviews, extensions-reviews_chromium.org, creis+watch_chromium.org, tfarina, nasko+codewatch_chromium.org, jam, darin-cc_chromium.org, chromium-apps-reviews_chromium.org
Visibility:
Public.

Description

Implementation of a Zoom Extension API as an addition to the chrome.tabs API, as outlined in https://docs.google.com/a/chromium.org/document/d/1sCZjx1J3_M2a02T8NXd-ufGKZDoBHI5Ixis1DaGLQCA/edit?usp=sharing. Based on code from https://codereview.chromium.org/232773011/, with various fixes and rebased against changes in https://codereview.chromium.org/287093002/ Depends on changes in https://codereview.chromium.org/302603012/ BUG=30583 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=281468

Patch Set 1 #

Patch Set 2 : In progress, uploaded for testing only. #

Patch Set 3 : Fixed some issues surrounding zoom modes. #

Patch Set 4 : Updated to match changes in content/ CL. #

Patch Set 5 : Update to match changes in content/ CL. #

Total comments: 11

Patch Set 6 : Add event manager for manual zoom events. #

Total comments: 110

Patch Set 7 : Rebase to r277411 #

Patch Set 8 : Address comments. #

Total comments: 78

Patch Set 9 : Address comments. #

Patch Set 10 : Rebase to r279101. #

Patch Set 11 : Create ZoomController for guest web contents. #

Total comments: 15

Patch Set 12 : Address comments, make zoom bubble icon loading safer. #

Total comments: 31

Patch Set 13 : Address Sky's comments. #

Patch Set 14 : Rebase to r279487. #

Total comments: 2

Patch Set 15 : Address comments: move ZoomObserver registration to TabsEventRouter. #

Total comments: 23

Patch Set 16 : Set icon image size when button added. #

Total comments: 2

Patch Set 17 : Remove explicit setting of image size. #

Total comments: 8

Patch Set 18 : Address dbeam@'s comments. #

Total comments: 24

Patch Set 19 : Address comments. #

Total comments: 13

Patch Set 20 : Fix duplicate, missing events; address comments. #

Patch Set 21 : Rebase to r281397. #

Patch Set 22 : Fix Mac Compile, zoom_controller_unittest. #

Patch Set 23 : Remove unused includes that break compilation on Android. #

Patch Set 24 : Fix javascript test function signature. #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+1559 lines, -136 lines) Patch
M chrome/app/generated_resources.grd View 1 chunk +4 lines, -1 line 0 comments Download
M chrome/browser/chrome_page_zoom.cc View 1 2 3 4 5 6 7 8 4 chunks +8 lines, -4 lines 0 comments Download
M chrome/browser/extensions/api/tabs/tabs_api.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +54 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/tabs/tabs_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 4 chunks +168 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/tabs/tabs_constants.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/tabs/tabs_constants.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/tabs/tabs_event_router.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +8 lines, -1 line 0 comments Download
M chrome/browser/extensions/api/tabs/tabs_event_router.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +30 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/tabs/tabs_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +319 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/tabs/tabs_windows_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/guest_view/web_view/web_view_guest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 4 chunks +17 lines, -4 lines 0 comments Download
M chrome/browser/ui/browser.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +6 lines, -4 lines 0 comments Download
M chrome/browser/ui/browser.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 7 chunks +15 lines, -10 lines 0 comments Download
M chrome/browser/ui/browser_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +17 lines, -3 lines 0 comments Download
M chrome/browser/ui/cocoa/browser/zoom_bubble_controller.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/toolbar/wrench_menu_model.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/toolbar/wrench_menu_model.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +11 lines, -6 lines 0 comments Download
M chrome/browser/ui/views/location_bar/zoom_bubble_view.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 6 chunks +42 lines, -1 line 0 comments Download
M chrome/browser/ui/views/location_bar/zoom_bubble_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 8 chunks +154 lines, -37 lines 0 comments Download
M chrome/browser/ui/views/location_bar/zoom_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/toolbar/wrench_menu.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 4 chunks +13 lines, -7 lines 0 comments Download
M chrome/browser/ui/webui/ntp/ntp_login_handler.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/zoom/zoom_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 4 chunks +90 lines, -6 lines 6 comments Download
M chrome/browser/ui/zoom/zoom_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 5 chunks +234 lines, -16 lines 0 comments Download
M chrome/browser/ui/zoom/zoom_controller_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 3 chunks +71 lines, -7 lines 0 comments Download
A chrome/browser/ui/zoom/zoom_event_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +44 lines, -0 lines 0 comments Download
A chrome/browser/ui/zoom/zoom_event_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +34 lines, -0 lines 0 comments Download
M chrome/browser/ui/zoom/zoom_observer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/_api_features.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +12 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/tabs.json View 1 2 3 chunks +159 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/tabs/basics/events.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +17 lines, -1 line 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +0 lines, -2 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +0 lines, -12 lines 0 comments Download
M content/public/browser/web_contents.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -4 lines 0 comments Download
M extensions/browser/extension_function_histogram_value.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +4 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 76 (0 generated)
wjmaclean
This work is getting fairly mature, so I've removed the [WIP] from the description, and ...
6 years, 6 months ago (2014-06-05 17:55:34 UTC) #1
raymes
On 2014/06/05 17:55:34, wjmaclean wrote: > This work is getting fairly mature, so I've removed ...
6 years, 6 months ago (2014-06-10 04:17:25 UTC) #2
not at google - send to devlin
I remember that the original zoom patch got tied up on the content side. has ...
6 years, 6 months ago (2014-06-10 19:21:24 UTC) #3
wjmaclean
On 2014/06/10 19:21:24, kalman wrote: > I remember that the original zoom patch got tied ...
6 years, 6 months ago (2014-06-10 20:02:15 UTC) #4
wjmaclean
This version (Patch Set 5) moves the book keeping for manual mode into ZoomController. This ...
6 years, 6 months ago (2014-06-12 17:54:10 UTC) #5
Fady Samuel
A quick initial look. I'm probably not the best reviewer for this part of the ...
6 years, 6 months ago (2014-06-12 19:38:58 UTC) #6
wjmaclean
https://codereview.chromium.org/301733006/diff/80001/chrome/browser/guest_view/web_view/web_view_guest.cc File chrome/browser/guest_view/web_view/web_view_guest.cc (right): https://codereview.chromium.org/301733006/diff/80001/chrome/browser/guest_view/web_view/web_view_guest.cc#newcode1332 chrome/browser/guest_view/web_view/web_view_guest.cc:1332: // TODO(wjmaclean) Should we talk to HostZoomMap directly instead? ...
6 years, 6 months ago (2014-06-12 19:42:22 UTC) #7
wjmaclean
Sorry for spamming with multiple comments here, but I realized they could be addressed soon ...
6 years, 6 months ago (2014-06-12 19:45:25 UTC) #8
Fady Samuel
https://codereview.chromium.org/301733006/diff/80001/chrome/browser/chrome_page_zoom.cc File chrome/browser/chrome_page_zoom.cc (right): https://codereview.chromium.org/301733006/diff/80001/chrome/browser/chrome_page_zoom.cc#newcode79 chrome/browser/chrome_page_zoom.cc:79: // TODO(wjmaclean) Should we be talking to HostZoomMap directly ...
6 years, 6 months ago (2014-06-12 19:46:57 UTC) #9
not at google - send to devlin
I'm not going to have time to get to this expediently, so passing the baton ...
6 years, 6 months ago (2014-06-13 15:47:41 UTC) #10
wjmaclean
On 2014/06/13 15:47:41, kalman wrote: > I'm not going to have time to get to ...
6 years, 6 months ago (2014-06-13 15:48:56 UTC) #11
Devlin
On 2014/06/13 15:48:56, wjmaclean wrote: > On 2014/06/13 15:47:41, kalman wrote: > > I'm not ...
6 years, 6 months ago (2014-06-13 16:26:41 UTC) #12
wjmaclean
On 2014/06/13 16:26:41, Devlin wrote: > On 2014/06/13 15:48:56, wjmaclean wrote: > > On 2014/06/13 ...
6 years, 6 months ago (2014-06-13 17:19:11 UTC) #13
wjmaclean
PTAL. Revised to account for moving manual zoom levels out of HostZoomMap and into ZoomController.
6 years, 6 months ago (2014-06-13 20:28:47 UTC) #14
wjmaclean
Now that https://codereview.chromium.org/302603012/ has landed, this is the last step (hopefully) in getting the tabs ...
6 years, 6 months ago (2014-06-16 13:32:55 UTC) #15
Devlin
https://codereview.chromium.org/301733006/diff/100001/chrome/browser/extensions/api/tabs/tabs_api.cc File chrome/browser/extensions/api/tabs/tabs_api.cc (right): https://codereview.chromium.org/301733006/diff/100001/chrome/browser/extensions/api/tabs/tabs_api.cc#newcode1777 chrome/browser/extensions/api/tabs/tabs_api.cc:1777: bool ZoomAPIFunction::GetWebContents(int* tab_id, Why not content::WebContents* GetWebContents(int* tab_id), which ...
6 years, 6 months ago (2014-06-16 19:04:50 UTC) #16
Devlin
https://codereview.chromium.org/301733006/diff/100001/chrome/browser/extensions/api/tabs/tabs_api.cc File chrome/browser/extensions/api/tabs/tabs_api.cc (right): https://codereview.chromium.org/301733006/diff/100001/chrome/browser/extensions/api/tabs/tabs_api.cc#newcode1813 chrome/browser/extensions/api/tabs/tabs_api.cc:1813: error_ = keys::kCannotZoomChromePagesError; On 2014/06/16 19:04:47, Devlin wrote: > ...
6 years, 6 months ago (2014-06-17 19:10:20 UTC) #17
wjmaclean
Here's a revised version, I think I've managed to address all your comments - PTAL ...
6 years, 6 months ago (2014-06-18 19:03:56 UTC) #18
Devlin
Getting closer! Mostly nits this time around. https://codereview.chromium.org/301733006/diff/140001/chrome/browser/chrome_page_zoom.cc File chrome/browser/chrome_page_zoom.cc (right): https://codereview.chromium.org/301733006/diff/140001/chrome/browser/chrome_page_zoom.cc#newcode79 chrome/browser/chrome_page_zoom.cc:79: // TODO(wjmaclean) ...
6 years, 6 months ago (2014-06-19 21:15:30 UTC) #19
wjmaclean
Here's another revision, I think I've addressed all the new comments. PTAL https://codereview.chromium.org/301733006/diff/140001/chrome/browser/chrome_page_zoom.cc File chrome/browser/chrome_page_zoom.cc ...
6 years, 6 months ago (2014-06-20 22:01:34 UTC) #20
wjmaclean
https://codereview.chromium.org/301733006/diff/200001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/301733006/diff/200001/chrome/browser/chrome_content_browser_client.cc#newcode854 chrome/browser/chrome_content_browser_client.cc:854: Oops, I'll remove this line.
6 years, 6 months ago (2014-06-23 18:40:48 UTC) #21
Devlin
This version is mostly lg, so if you wanted to have some other reviewers start ...
6 years, 6 months ago (2014-06-23 22:56:08 UTC) #22
wjmaclean
+ sky@ for chrome/browser/ui fsamuel@ for chrome/browser/guest_view I've addressed all the comments, please see my ...
6 years, 6 months ago (2014-06-24 15:38:16 UTC) #23
sky
https://codereview.chromium.org/301733006/diff/220001/chrome/browser/ui/browser.h File chrome/browser/ui/browser.h (right): https://codereview.chromium.org/301733006/diff/220001/chrome/browser/ui/browser.h#newcode758 chrome/browser/ui/browser.h:758: void SetAsObserver(content::WebContents* web_contents); The name and this function and ...
6 years, 6 months ago (2014-06-24 16:23:42 UTC) #24
wjmaclean
I've done my best to address all the comments in this round, and have provided ...
6 years, 6 months ago (2014-06-24 18:04:07 UTC) #25
Devlin
https://codereview.chromium.org/301733006/diff/220001/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc File chrome/browser/ui/views/location_bar/zoom_bubble_view.cc (right): https://codereview.chromium.org/301733006/diff/220001/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc#newcode281 chrome/browser/ui/views/location_bar/zoom_bubble_view.cc:281: std::string url = base::StringPrintf("chrome://extensions?id="); On 2014/06/24 18:04:07, wjmaclean wrote: ...
6 years, 6 months ago (2014-06-24 18:11:15 UTC) #26
wjmaclean
On 2014/06/24 18:11:15, Devlin wrote: > https://codereview.chromium.org/301733006/diff/220001/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc > File chrome/browser/ui/views/location_bar/zoom_bubble_view.cc (right): > > https://codereview.chromium.org/301733006/diff/220001/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc#newcode281 > ...
6 years, 6 months ago (2014-06-24 18:25:05 UTC) #27
sky
https://codereview.chromium.org/301733006/diff/220001/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc File chrome/browser/ui/views/location_bar/zoom_bubble_view.cc (right): https://codereview.chromium.org/301733006/diff/220001/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc#newcode249 chrome/browser/ui/views/location_bar/zoom_bubble_view.cc:249: image_button_->SetImage(views::Button::STATE_NORMAL, On 2014/06/24 18:04:07, wjmaclean wrote: > On 2014/06/24 ...
6 years, 6 months ago (2014-06-25 16:02:40 UTC) #28
wjmaclean
+ kalman@ for extensions (TabsEventRouter) I've moved the TabsEventRouter registration as a ZoomObserver for ZoomController ...
6 years, 6 months ago (2014-06-25 17:21:30 UTC) #29
Devlin
On 2014/06/25 17:21:30, wjmaclean wrote: > + kalman@ for extensions (TabsEventRouter) > > I've moved ...
6 years, 6 months ago (2014-06-25 17:37:13 UTC) #30
wjmaclean
On 2014/06/25 17:37:13, Devlin wrote: > On 2014/06/25 17:21:30, wjmaclean wrote: > > + kalman@ ...
6 years, 6 months ago (2014-06-25 17:48:10 UTC) #31
Devlin
On 2014/06/25 17:48:10, wjmaclean wrote: > On 2014/06/25 17:37:13, Devlin wrote: > > On 2014/06/25 ...
6 years, 6 months ago (2014-06-25 17:52:35 UTC) #32
sky
Can you get a local owner for the changes to to chrome/browser/ui/zoom? I'm adding dbeam ...
6 years, 6 months ago (2014-06-25 18:53:53 UTC) #33
wjmaclean
Sorry, did you mean for me to find a local owner in addition to dbeam@ ...
6 years, 6 months ago (2014-06-25 19:01:31 UTC) #34
wjmaclean
+ jam@ for web_contents.h + mpearson@ for tools/metrics, extensions/browser/extension_function_histogram_value.h
6 years, 6 months ago (2014-06-25 19:07:05 UTC) #35
Mark P
lgtm for extensions/browser/extension_function_histogram_value.h tools/metrics/histograms/histograms.xml --mark
6 years, 6 months ago (2014-06-25 19:28:29 UTC) #36
sky
On Wed, Jun 25, 2014 at 12:01 PM, <wjmaclean@chromium.org> wrote: > Sorry, did you mean ...
6 years, 6 months ago (2014-06-25 19:31:42 UTC) #37
sky
On Wed, Jun 25, 2014 at 12:01 PM, <wjmaclean@chromium.org> wrote: > Sorry, did you mean ...
6 years, 6 months ago (2014-06-25 19:32:30 UTC) #38
sky
https://codereview.chromium.org/301733006/diff/290001/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc File chrome/browser/ui/views/location_bar/zoom_bubble_view.cc (right): https://codereview.chromium.org/301733006/diff/290001/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc#newcode248 chrome/browser/ui/views/location_bar/zoom_bubble_view.cc:248: image_button_->SetPreferredSize( Now I'm slightly confused. As long as the ...
6 years, 6 months ago (2014-06-25 21:02:42 UTC) #39
wjmaclean
https://codereview.chromium.org/301733006/diff/290001/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc File chrome/browser/ui/views/location_bar/zoom_bubble_view.cc (right): https://codereview.chromium.org/301733006/diff/290001/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc#newcode248 chrome/browser/ui/views/location_bar/zoom_bubble_view.cc:248: image_button_->SetPreferredSize( On 2014/06/25 21:02:42, sky wrote: > Now I'm ...
6 years, 6 months ago (2014-06-25 21:12:19 UTC) #40
Fady Samuel
lgtm
6 years, 6 months ago (2014-06-25 21:17:59 UTC) #41
sky
LGTM
6 years, 6 months ago (2014-06-25 23:35:34 UTC) #42
Dan Beam
https://codereview.chromium.org/301733006/diff/270001/chrome/browser/ui/zoom/zoom_controller.cc File chrome/browser/ui/zoom/zoom_controller.cc (right): https://codereview.chromium.org/301733006/diff/270001/chrome/browser/ui/zoom/zoom_controller.cc#newcode77 chrome/browser/ui/zoom/zoom_controller.cc:77: : content::HostZoomMap::GetZoomLevel(web_contents()); return zoom_mode_ == ZOOM_MODE_MANUAL ? zoom_level_ : ...
6 years, 6 months ago (2014-06-26 03:40:03 UTC) #43
wjmaclean
I've addressed dbeam@'s comments, PTAL. https://codereview.chromium.org/301733006/diff/270001/chrome/browser/ui/zoom/zoom_controller.cc File chrome/browser/ui/zoom/zoom_controller.cc (right): https://codereview.chromium.org/301733006/diff/270001/chrome/browser/ui/zoom/zoom_controller.cc#newcode77 chrome/browser/ui/zoom/zoom_controller.cc:77: : content::HostZoomMap::GetZoomLevel(web_contents()); On 2014/06/26 ...
6 years, 6 months ago (2014-06-26 15:30:31 UTC) #44
jam
content lgtm
6 years, 6 months ago (2014-06-26 16:26:10 UTC) #45
Dan Beam
https://codereview.chromium.org/301733006/diff/270001/chrome/browser/ui/zoom/zoom_controller.cc File chrome/browser/ui/zoom/zoom_controller.cc (right): https://codereview.chromium.org/301733006/diff/270001/chrome/browser/ui/zoom/zoom_controller.cc#newcode199 chrome/browser/ui/zoom/zoom_controller.cc:199: // in the other mode. On 2014/06/26 15:30:30, wjmaclean ...
6 years, 5 months ago (2014-06-26 22:16:38 UTC) #46
wjmaclean
PTAL https://codereview.chromium.org/301733006/diff/330001/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc File chrome/browser/ui/views/location_bar/zoom_bubble_view.cc (right): https://codereview.chromium.org/301733006/diff/330001/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc#newcode188 chrome/browser/ui/views/location_bar/zoom_bubble_view.cc:188: ResourceBundle& rb = ResourceBundle::GetSharedInstance(); On 2014/06/26 22:16:37, Dan ...
6 years, 5 months ago (2014-07-02 22:24:59 UTC) #47
Dan Beam
lgtm w/nits https://codereview.chromium.org/301733006/diff/350001/chrome/browser/ui/zoom/zoom_observer.h File chrome/browser/ui/zoom/zoom_observer.h (right): https://codereview.chromium.org/301733006/diff/350001/chrome/browser/ui/zoom/zoom_observer.h#newcode17 chrome/browser/ui/zoom/zoom_observer.h:17: struct OnZoomChangedEventData { nit: ZoomChangeData or ZoomChangeEventData ...
6 years, 5 months ago (2014-07-03 01:28:53 UTC) #48
Devlin
Also lgtm with nits. https://codereview.chromium.org/301733006/diff/350001/chrome/browser/extensions/api/tabs/tabs_api.cc File chrome/browser/extensions/api/tabs/tabs_api.cc (right): https://codereview.chromium.org/301733006/diff/350001/chrome/browser/extensions/api/tabs/tabs_api.cc#newcode1807 chrome/browser/extensions/api/tabs/tabs_api.cc:1807: if (url.SchemeIs(content::kChromeUIScheme) || Recently we ...
6 years, 5 months ago (2014-07-03 14:55:37 UTC) #49
wjmaclean
I've addressed the last round of comments. dbeam@ - I made some changes in ZoomController ...
6 years, 5 months ago (2014-07-03 19:37:22 UTC) #50
wjmaclean
I'm going to go ahead and try to land this while the tree is quiet. ...
6 years, 5 months ago (2014-07-04 13:11:29 UTC) #51
wjmaclean
The CQ bit was checked by wjmaclean@chromium.org
6 years, 5 months ago (2014-07-04 13:11:50 UTC) #52
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wjmaclean@chromium.org/301733006/370001
6 years, 5 months ago (2014-07-04 13:12:26 UTC) #53
wjmaclean
The CQ bit was checked by wjmaclean@chromium.org
6 years, 5 months ago (2014-07-04 13:27:31 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wjmaclean@chromium.org/301733006/390001
6 years, 5 months ago (2014-07-04 13:27:48 UTC) #55
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_clang_dbg on tryserver.chromium ...
6 years, 5 months ago (2014-07-04 14:32:56 UTC) #56
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-04 14:35:55 UTC) #57
commit-bot: I haz the power
Try jobs failed on following builders: android_dbg on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg/builds/202858)
6 years, 5 months ago (2014-07-04 14:35:57 UTC) #58
wjmaclean
The CQ bit was checked by wjmaclean@chromium.org
6 years, 5 months ago (2014-07-04 17:30:07 UTC) #59
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wjmaclean@chromium.org/301733006/410001
6 years, 5 months ago (2014-07-04 17:30:33 UTC) #60
wjmaclean
The CQ bit was unchecked by wjmaclean@chromium.org
6 years, 5 months ago (2014-07-04 17:39:10 UTC) #61
wjmaclean
The CQ bit was checked by wjmaclean@chromium.org
6 years, 5 months ago (2014-07-04 17:41:59 UTC) #62
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wjmaclean@chromium.org/301733006/430001
6 years, 5 months ago (2014-07-04 17:42:53 UTC) #63
wjmaclean
The CQ bit was unchecked by wjmaclean@chromium.org
6 years, 5 months ago (2014-07-04 18:40:14 UTC) #64
wjmaclean
The CQ bit was checked by wjmaclean@chromium.org
6 years, 5 months ago (2014-07-04 18:42:06 UTC) #65
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wjmaclean@chromium.org/301733006/450001
6 years, 5 months ago (2014-07-04 18:43:12 UTC) #66
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: mac_chromium_rel on tryserver.chromium ...
6 years, 5 months ago (2014-07-04 22:34:26 UTC) #67
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-05 00:29:02 UTC) #68
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/mac_chromium_rel/builds/46023)
6 years, 5 months ago (2014-07-05 00:29:04 UTC) #69
wjmaclean
The CQ bit was checked by wjmaclean@chromium.org
6 years, 5 months ago (2014-07-05 01:35:07 UTC) #70
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wjmaclean@chromium.org/301733006/470001
6 years, 5 months ago (2014-07-05 01:36:01 UTC) #71
commit-bot: I haz the power
Change committed as 281468
6 years, 5 months ago (2014-07-05 19:09:10 UTC) #72
Dan Beam
https://codereview.chromium.org/301733006/diff/350001/chrome/browser/ui/zoom/zoom_observer.h File chrome/browser/ui/zoom/zoom_observer.h (right): https://codereview.chromium.org/301733006/diff/350001/chrome/browser/ui/zoom/zoom_observer.h#newcode33 chrome/browser/ui/zoom/zoom_observer.h:33: }; On 2014/07/03 19:37:21, wjmaclean wrote: > On 2014/07/03 ...
6 years, 5 months ago (2014-07-07 17:04:18 UTC) #73
wjmaclean
https://codereview.chromium.org/301733006/diff/470001/chrome/browser/ui/zoom/zoom_controller.h File chrome/browser/ui/zoom/zoom_controller.h (right): https://codereview.chromium.org/301733006/diff/470001/chrome/browser/ui/zoom/zoom_controller.h#newcode62 chrome/browser/ui/zoom/zoom_controller.h:62: can_show_bubble(can_show_bubble) {} On 2014/07/07 17:04:18, Dan Beam wrote: > ...
6 years, 5 months ago (2014-07-07 17:12:52 UTC) #74
Dan Beam
https://codereview.chromium.org/301733006/diff/470001/chrome/browser/ui/zoom/zoom_controller.h File chrome/browser/ui/zoom/zoom_controller.h (right): https://codereview.chromium.org/301733006/diff/470001/chrome/browser/ui/zoom/zoom_controller.h#newcode62 chrome/browser/ui/zoom/zoom_controller.h:62: can_show_bubble(can_show_bubble) {} On 2014/07/07 17:12:52, wjmaclean wrote: > On ...
6 years, 5 months ago (2014-07-07 17:20:20 UTC) #75
wjmaclean
6 years, 5 months ago (2014-07-07 17:27:10 UTC) #76
Message was sent while issue was closed.
On 2014/07/07 17:20:20, Dan Beam wrote:
>
https://codereview.chromium.org/301733006/diff/470001/chrome/browser/ui/zoom/...
> File chrome/browser/ui/zoom/zoom_controller.h (right):
> 
>
https://codereview.chromium.org/301733006/diff/470001/chrome/browser/ui/zoom/...
> chrome/browser/ui/zoom/zoom_controller.h:62: can_show_bubble(can_show_bubble)
{}
> On 2014/07/07 17:12:52, wjmaclean wrote:
> > On 2014/07/07 17:04:18, Dan Beam wrote:
> > > ^ i don't think this initializer list is necessary
> > 
> > Hmm, then I should initialize using
> > 
> > ZoomChangedEventData data = {val1, val2, ...}
> 
> yep, that'd work
> 
> > 
> > or
> > 
> > ZoomChangedEventData data;
> > data.val1 = value1;
> > ...
> 
> or that
> 
> > 
> > Is this what you had in mind?
> 
> yes
> 
> > I had hoped to keep initialization simple by doing
> > it when the struct is declared.
> > 
> 
> how does my suggestion prevent you from doing this?

I'd like to be able to do things like:

event_data_.push_back(ZoomChangedEventData(web_contents(),
                                           GetZoomLevel(),
                                           zoom_level,
                                           zoom_mode_,
                                           false /* can_show_bubble */));

which I don't think would work without the constructor. I just think this looks
cleaner. Is having the initializer extra overhead?

>
https://codereview.chromium.org/301733006/diff/470001/chrome/browser/ui/zoom/...
> chrome/browser/ui/zoom/zoom_controller.h:139:
std::vector<ZoomChangedEventData>
> event_data_;
> On 2014/07/07 17:12:52, wjmaclean wrote:
> > On 2014/07/07 17:04:17, Dan Beam wrote:
> > > why is this a vector if you only ever use 1?
> > 
> > I wanted a clear way to test if there was an event object or not when
> > UpdateState is called ... perhaps the vector is overkill (could do it with
an
> > member var and a bool)?
> 
> yes, or a scoped_ptr if you don't mind heap allocating

Heap allocation would be simpler I guess, though (as you note) a bit more
expensive. I'll think about it and come back with a CL to remove the vector.

Powered by Google App Engine
This is Rietveld 408576698