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

Issue 10736028: Refactor browser window zoom handling and enable zoom icon on all platforms. (Closed)

Created:
8 years, 5 months ago by Dan Beam
Modified:
8 years, 4 months ago
CC:
chromium-reviews, Avi (use Gerrit), jennb, creis+watch_chromium.org, ajwong+watch_chromium.org, Dmitry Titov, jianli, dcheng, brettw-cc_chromium.org
Visibility:
Public.

Description

Refactor browser window zoom handling and enable zoom icon on all platforms. On all platforms: After this CL there should be zoom icon in the omnibox when on a page with non-default zoom (- for less than default, + for more than default). If the zoom is reset with Ctrl+0, no bubble should show up and the icon should disappear. If tabs with different zooms are switched between, the zoom icon should update itself for each tab without showing a bubble. On Views and GTK: While changing zoom with Ctrl +/-, a zoom bubble should show up if you zoomed *to* a non-default level. If you quickly change to a different tab after changing the zoom level, the bubble should disappear. BUG=86817, 128817 TEST=Compiles, passes tests, doesn't regress current zoom functionality. TODO=Zoom *bubble* on Mac. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=152744

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : . #

Total comments: 4

Patch Set 4 : saving work #

Patch Set 5 : saving work w/less presubmit nits #

Patch Set 6 : trying to separate refactor #

Patch Set 7 : zoom icon on all platorms? #

Patch Set 8 : next patchset #

Patch Set 9 : . #

Patch Set 10 : const #

Patch Set 11 : rebase #

Patch Set 12 : working again #

Patch Set 13 : fixes? #

Patch Set 14 : browser_tests fix #

Patch Set 15 : shifting bits #

Patch Set 16 : fix mac #

Total comments: 12

Patch Set 17 : . #

Patch Set 18 : . #

Patch Set 19 : . #

Patch Set 20 : linux fix #

Patch Set 21 : forwards #

Patch Set 22 : . #

Patch Set 23 : views fixes #

Patch Set 24 : . #

Patch Set 25 : . #

Total comments: 2

Patch Set 26 : . #

Patch Set 27 : . #

Patch Set 28 : . #

Total comments: 1

Patch Set 29 : . #

Total comments: 10

Patch Set 30 : rebase #

Total comments: 9

Patch Set 31 : pkasting review #

Patch Set 32 : . #

Patch Set 33 : . #

Patch Set 34 : . #

Patch Set 35 : . #

Patch Set 36 : . #

Patch Set 37 : . #

Patch Set 38 : . #

Patch Set 39 : . #

Patch Set 40 : . #

Patch Set 41 : rebase #

Patch Set 42 : uncomment code #

Patch Set 43 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+267 lines, -239 lines) Patch
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 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 1 chunk +0 lines, -3 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 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 2 chunks +3 lines, -13 lines 0 comments Download
M chrome/browser/ui/browser_command_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 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 1 chunk +1 line, -4 lines 0 comments Download
M chrome/browser/ui/browser_window.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 2 chunks +5 lines, -9 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_cocoa.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 1 chunk +1 line, -3 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_cocoa.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 1 chunk +2 lines, -10 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 5 chunks +19 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 9 chunks +28 lines, -12 lines 0 comments Download
A chrome/browser/ui/cocoa/location_bar/zoom_decoration.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 1 chunk +43 lines, -0 lines 0 comments Download
A 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 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 1 chunk +49 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/toolbar/toolbar_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 17 18 19 20 21 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/gtk/browser_window_gtk.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 1 chunk +1 line, -3 lines 0 comments Download
M chrome/browser/ui/gtk/browser_window_gtk.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 1 chunk +2 lines, -10 lines 0 comments Download
M chrome/browser/ui/gtk/location_bar_view_gtk.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 2 chunks +5 lines, -8 lines 0 comments Download
M chrome/browser/ui/gtk/location_bar_view_gtk.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 4 chunks +21 lines, -25 lines 0 comments Download
M chrome/browser/ui/panels/panel_browser_window.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -3 lines 0 comments Download
M chrome/browser/ui/panels/panel_browser_window.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -10 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_view.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -4 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 1 chunk +2 lines, -11 lines 0 comments Download
M chrome/browser/ui/views/location_bar/location_bar_view.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 3 chunks +5 lines, -9 lines 0 comments Download
M chrome/browser/ui/views/location_bar/location_bar_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 2 chunks +13 lines, -10 lines 0 comments Download
M chrome/browser/ui/views/location_bar/zoom_view.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 4 chunks +3 lines, -11 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 20 21 22 23 24 25 26 27 28 29 30 3 chunks +15 lines, -30 lines 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 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 2 chunks +8 lines, -12 lines 0 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 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 3 chunks +15 lines, -27 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 20 1 chunk +1 line, -9 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/test/base/test_browser_window.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -3 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
Evan Stade
this looks ok to me. Ben should be the reviewer though. http://codereview.chromium.org/10736028/diff/4001/chrome/browser/ui/browser_window.h File chrome/browser/ui/browser_window.h (right): ...
8 years, 5 months ago (2012-07-13 05:31:00 UTC) #1
Dan Beam
+khorimoto before I bring in the platform specific reviewers. also, obviously I'll wait to see ...
8 years, 5 months ago (2012-07-24 03:00:49 UTC) #2
Kyle Horimoto
https://chromiumcodereview.appspot.com/10736028/diff/31002/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h File chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h (right): https://chromiumcodereview.appspot.com/10736028/diff/31002/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h#newcode99 chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h:99: // change (e.g. switching tabs, creating a new tab, ...
8 years, 5 months ago (2012-07-24 03:22:28 UTC) #3
Kyle Horimoto
http://codereview.chromium.org/10736028/diff/31002/chrome/browser/ui/browser.cc File chrome/browser/ui/browser.cc (right): http://codereview.chromium.org/10736028/diff/31002/chrome/browser/ui/browser.cc#newcode1737 chrome/browser/ui/browser.cc:1737: window_->ZoomChangedForActiveTab(can_show_bubble && window_->IsActive()); Also, is there a better method ...
8 years, 5 months ago (2012-07-24 20:08:11 UTC) #4
Evan Stade
gtk lgtm http://codereview.chromium.org/10736028/diff/31002/chrome/browser/ui/browser.cc File chrome/browser/ui/browser.cc (right): http://codereview.chromium.org/10736028/diff/31002/chrome/browser/ui/browser.cc#newcode1737 chrome/browser/ui/browser.cc:1737: window_->ZoomChangedForActiveTab(can_show_bubble && window_->IsActive()); On 2012/07/24 20:08:11, Kyle ...
8 years, 5 months ago (2012-07-24 20:12:49 UTC) #5
Dan Beam
I will be resuming work on this now that downstream CLs have landed, sorry for ...
8 years, 4 months ago (2012-08-04 03:24:20 UTC) #6
Dan Beam
so this has changed a bit, might want to take another glance (estade + khorimoto). ...
8 years, 4 months ago (2012-08-15 09:04:58 UTC) #7
Dan Beam
so this has changed a bit, might want to take another glance (estade + khorimoto). ...
8 years, 4 months ago (2012-08-15 09:04:59 UTC) #8
Evan Stade
https://chromiumcodereview.appspot.com/10736028/diff/47001/chrome/browser/ui/gtk/location_bar_view_gtk.cc File chrome/browser/ui/gtk/location_bar_view_gtk.cc (left): https://chromiumcodereview.appspot.com/10736028/diff/47001/chrome/browser/ui/gtk/location_bar_view_gtk.cc#oldcode1396 chrome/browser/ui/gtk/location_bar_view_gtk.cc:1396: ZoomBubbleGtk::Show(zoom_.get(), GetTabContents(), false); false is important
8 years, 4 months ago (2012-08-15 22:01:34 UTC) #9
Kyle Horimoto
non-mac lgtm
8 years, 4 months ago (2012-08-15 22:16:21 UTC) #10
Dan Beam
https://chromiumcodereview.appspot.com/10736028/diff/47001/chrome/browser/ui/gtk/location_bar_view_gtk.cc File chrome/browser/ui/gtk/location_bar_view_gtk.cc (left): https://chromiumcodereview.appspot.com/10736028/diff/47001/chrome/browser/ui/gtk/location_bar_view_gtk.cc#oldcode1396 chrome/browser/ui/gtk/location_bar_view_gtk.cc:1396: ZoomBubbleGtk::Show(zoom_.get(), GetTabContents(), false); On 2012/08/15 22:01:34, Evan Stade wrote: ...
8 years, 4 months ago (2012-08-15 23:13:37 UTC) #11
Dan Beam
+pkasting for chrome/browser/ui/views and chrome/browser/ui/*.(h|cc) https://chromiumcodereview.appspot.com/10736028/diff/35070/chrome/browser/ui/views/location_bar/location_bar_view.cc File chrome/browser/ui/views/location_bar/location_bar_view.cc (right): https://chromiumcodereview.appspot.com/10736028/diff/35070/chrome/browser/ui/views/location_bar/location_bar_view.cc#newcode401 chrome/browser/ui/views/location_bar/location_bar_view.cc:401: ZoomBubbleView::CloseBubble(); NOTE: yes, this ...
8 years, 4 months ago (2012-08-15 23:26:01 UTC) #12
Evan Stade
gtk lgtm
8 years, 4 months ago (2012-08-16 00:24:33 UTC) #13
Peter Kasting
LGTM https://chromiumcodereview.appspot.com/10736028/diff/44032/chrome/browser/ui/browser_window.h File chrome/browser/ui/browser_window.h (right): https://chromiumcodereview.appspot.com/10736028/diff/44032/chrome/browser/ui/browser_window.h#newcode122 chrome/browser/ui/browser_window.h:122: // Called when the zoom in the active ...
8 years, 4 months ago (2012-08-16 04:04:47 UTC) #14
Scott Hess - ex-Googler
LGTM for ui/cocoa, minor suggestions. https://chromiumcodereview.appspot.com/10736028/diff/34031/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm File chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm (right): https://chromiumcodereview.appspot.com/10736028/diff/34031/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm#newcode474 chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm:474: void LocationBarViewMac::OnImageDecorationsChanged() { Suggest ...
8 years, 4 months ago (2012-08-16 04:52:58 UTC) #15
Dan Beam
addressing pkasting@ review feedback https://chromiumcodereview.appspot.com/10736028/diff/44032/chrome/browser/ui/browser_window.h File chrome/browser/ui/browser_window.h (right): https://chromiumcodereview.appspot.com/10736028/diff/44032/chrome/browser/ui/browser_window.h#newcode122 chrome/browser/ui/browser_window.h:122: // Called when the zoom ...
8 years, 4 months ago (2012-08-16 06:52:28 UTC) #16
Dan Beam
addressing pkasting@ review feedback https://chromiumcodereview.appspot.com/10736028/diff/44032/chrome/browser/ui/browser_window.h File chrome/browser/ui/browser_window.h (right): https://chromiumcodereview.appspot.com/10736028/diff/44032/chrome/browser/ui/browser_window.h#newcode122 chrome/browser/ui/browser_window.h:122: // Called when the zoom ...
8 years, 4 months ago (2012-08-16 06:52:29 UTC) #17
Dan Beam
https://chromiumcodereview.appspot.com/10736028/diff/34031/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm File chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm (right): https://chromiumcodereview.appspot.com/10736028/diff/34031/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm#newcode474 chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm:474: void LocationBarViewMac::OnImageDecorationsChanged() { On 2012/08/16 04:52:58, shess wrote: > ...
8 years, 4 months ago (2012-08-16 08:55:03 UTC) #18
Dan Beam
+sky for chrome/test/* and chrome/*.gypi
8 years, 4 months ago (2012-08-16 15:46:12 UTC) #19
sky
LGTM
8 years, 4 months ago (2012-08-16 16:44:56 UTC) #20
Scott Hess - ex-Googler
still LGTM for ui/cocoa/ https://chromiumcodereview.appspot.com/10736028/diff/34031/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm File chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm (right): https://chromiumcodereview.appspot.com/10736028/diff/34031/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm#newcode751 chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm:751: if (!zoom_decoration_.get() || !tab_contents) On ...
8 years, 4 months ago (2012-08-16 20:09:31 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dbeam@chromium.org/10736028/37106
8 years, 4 months ago (2012-08-17 06:33:55 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dbeam@chromium.org/10736028/37106
8 years, 4 months ago (2012-08-17 13:46:49 UTC) #23
commit-bot: I haz the power
8 years, 4 months ago (2012-08-17 13:47:22 UTC) #24
Change committed as 152080

Powered by Google App Engine
This is Rietveld 408576698