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

Issue 310913002: Issue 32919: Update the Zoom NSMenuItems (Zoom-In/Zoom-out/Actual-Size) when the zoom state changes. (Closed)

Created:
6 years, 6 months ago by sarka
Modified:
6 years, 4 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Update the Zoom NSMenuItems (Zoom-In/Zoom-out/Actual-Size) when the zoom state changes. The fix basically works in the following way. Look at Zoom Observer overridden methods which is implemented in Browser.cc. When the zoom state changes send relevant messages to Command_Updater to enable / disable Zoom Menu Items. BUG=32919 TEST=Open a NTP , load a url. Zoom-In max and the Zoom-In menu item should be disabled likewise zoom-out max and the zoom-out menu should be disabled. When a NTP or a page is loaded by default the zoom scale is 100% hence the Actual size menu item should be disabled. R=ben@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=287401

Patch Set 1 #

Total comments: 5

Patch Set 2 : Unit tests for Issue:32919 #

Total comments: 2

Patch Set 3 : Cross-platform unittest for Issue 32919 #

Total comments: 4

Patch Set 4 : Fixed Lint errors in zoom_controller_unittest.cc, fixed indent in browser_commands.cc #

Patch Set 5 : Updated patch with inline namespace in zoom_controller_unittest #

Patch Set 6 : Modified zoom_controller_unittests to pass try jobs on bots. #

Total comments: 2

Patch Set 7 : Removed an un-used protected variable from ZoomCommandsUnitTest class #

Patch Set 8 : Uploading a clean patch after rebase #

Total comments: 6

Patch Set 9 : Removed unused decls and extra empty lines #

Patch Set 10 : Uses ZoomController::GetZoomPercent since WebContents::GetZoomPercent doesn't exist any more #

Patch Set 11 : Moved the unit tests to browser_commands_unittest since its independent of ZoomController #

Total comments: 2

Patch Set 12 : Reverted zoom_controller_unittest.cc #

Total comments: 2

Patch Set 13 : Fixed Nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+157 lines, -1 line) Patch
M AUTHORS View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/browser_commands_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +112 lines, -0 lines 0 comments Download
M chrome/browser/ui/browser.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/browser_command_controller.h View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -0 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 3 chunks +17 lines, -1 line 0 comments Download
M chrome/browser/ui/browser_commands.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/browser_commands.cc View 1 2 3 4 5 6 7 8 9 2 chunks +18 lines, -0 lines 0 comments Download

Messages

Total messages: 58 (0 generated)
sarka
Please start reviewing this patch for defect 32919. Thanks
6 years, 6 months ago (2014-06-03 20:34:52 UTC) #1
Ben Goodger (Google)
https://codereview.chromium.org/310913002/diff/1/chrome/browser/ui/browser_commands.cc File chrome/browser/ui/browser_commands.cc (right): https://codereview.chromium.org/310913002/diff/1/chrome/browser/ui/browser_commands.cc#newcode962 chrome/browser/ui/browser_commands.cc:962: bool CanZoomIn(content::WebContents *contents) { nit: WebContents* contents here, and ...
6 years, 6 months ago (2014-06-05 15:45:03 UTC) #2
Ben Goodger (Google)
On 2014/06/05 15:45:03, Ben Goodger (Google) wrote: > https://codereview.chromium.org/310913002/diff/1/chrome/browser/ui/browser_commands.cc > File chrome/browser/ui/browser_commands.cc (right): > > ...
6 years, 6 months ago (2014-06-05 15:46:10 UTC) #3
sarka
Included unit tests associated with this Fix. Tests for Max-Zoom in, max Zoom-out and Actual ...
6 years, 6 months ago (2014-06-05 19:55:05 UTC) #4
Ben Goodger (Google)
Finally, have you submitted patches to chromium before? If not, can you add your info ...
6 years, 6 months ago (2014-06-05 21:19:02 UTC) #5
sarka
On 2014/06/05 21:19:02, Ben Goodger (Google) wrote: > Finally, have you submitted patches to chromium ...
6 years, 6 months ago (2014-06-07 18:56:11 UTC) #6
sarka
Added a cross-platform unit test for Zoom commands Please start reviewing the patch. Thanks
6 years, 6 months ago (2014-06-09 14:50:19 UTC) #7
sarka
Including more reviewers
6 years, 6 months ago (2014-06-11 15:11:04 UTC) #8
Robert Sesek
On 2014/06/11 15:11:04, eka508 wrote: > Including more reviewers Ben is probably the right reviewer ...
6 years, 6 months ago (2014-06-11 16:16:44 UTC) #9
Ben Goodger (Google)
lgtm with following nit: https://codereview.chromium.org/310913002/diff/40001/chrome/browser/ui/zoom/zoom_controller_unittest.cc File chrome/browser/ui/zoom/zoom_controller_unittest.cc (right): https://codereview.chromium.org/310913002/diff/40001/chrome/browser/ui/zoom/zoom_controller_unittest.cc#newcode31 chrome/browser/ui/zoom/zoom_controller_unittest.cc:31: using content::SiteInstance; nit: prevailing style ...
6 years, 6 months ago (2014-06-16 17:37:34 UTC) #10
Alexei Svitkine (slow)
Please make the first line of your CL description the same as the CL title. ...
6 years, 6 months ago (2014-06-16 17:41:46 UTC) #11
sarka
On 2014/06/16 17:41:46, Alexei Svitkine wrote: > Please make the first line of your CL ...
6 years, 6 months ago (2014-06-16 18:03:26 UTC) #12
sarka
On 2014/06/16 18:03:26, eka508 wrote: > On 2014/06/16 17:41:46, Alexei Svitkine wrote: > > Please ...
6 years, 6 months ago (2014-06-16 18:04:42 UTC) #13
sarka
On 2014/06/16 18:04:42, eka508 wrote: > On 2014/06/16 18:03:26, eka508 wrote: > > On 2014/06/16 ...
6 years, 6 months ago (2014-06-16 18:07:38 UTC) #14
sarka
Fixed indent in browser_commands.cc and lint errors in zoom_controller_unittest.cc Please review Thanks https://codereview.chromium.org/310913002/diff/40001/chrome/browser/ui/zoom/zoom_controller_unittest.cc File chrome/browser/ui/zoom/zoom_controller_unittest.cc ...
6 years, 6 months ago (2014-06-16 20:25:57 UTC) #15
Alexei Svitkine (slow)
https://codereview.chromium.org/310913002/diff/40001/chrome/browser/ui/zoom/zoom_controller_unittest.cc File chrome/browser/ui/zoom/zoom_controller_unittest.cc (right): https://codereview.chromium.org/310913002/diff/40001/chrome/browser/ui/zoom/zoom_controller_unittest.cc#newcode31 chrome/browser/ui/zoom/zoom_controller_unittest.cc:31: using content::SiteInstance; On 2014/06/16 20:25:57, eka508 wrote: > On ...
6 years, 6 months ago (2014-06-17 19:44:02 UTC) #16
sarka
On 2014/06/17 19:44:02, Alexei Svitkine wrote: > https://codereview.chromium.org/310913002/diff/40001/chrome/browser/ui/zoom/zoom_controller_unittest.cc > File chrome/browser/ui/zoom/zoom_controller_unittest.cc (right): > > https://codereview.chromium.org/310913002/diff/40001/chrome/browser/ui/zoom/zoom_controller_unittest.cc#newcode31 ...
6 years, 6 months ago (2014-06-19 01:51:49 UTC) #17
Alexei Svitkine (slow)
lgtm
6 years, 6 months ago (2014-06-19 15:04:44 UTC) #18
sarka
The CQ bit was checked by a.sarkar.arun@gmail.com
6 years, 6 months ago (2014-06-19 15:30:48 UTC) #19
sarka
The CQ bit was checked by a.sarkar.arun@gmail.com
6 years, 6 months ago (2014-06-19 15:32:45 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/a.sarkar.arun@gmail.com/310913002/80001
6 years, 6 months ago (2014-06-19 15:32:46 UTC) #21
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-19 19:44:34 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_clang_dbg/builds/153882) android_dbg on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg/builds/197858)
6 years, 6 months ago (2014-06-19 19:44:34 UTC) #23
sarka
On 2014/06/19 19:44:34, I haz the power (commit-bot) wrote: > Try jobs failed on following ...
6 years, 6 months ago (2014-06-19 19:49:17 UTC) #24
sarka
Modified unit_tests to pass try jobs. PTAL. Thanks
6 years, 4 months ago (2014-07-30 18:33:10 UTC) #25
Alexei Svitkine (slow)
LGTM % comments https://codereview.chromium.org/310913002/diff/100001/chrome/browser/ui/zoom/zoom_controller_unittest.cc File chrome/browser/ui/zoom/zoom_controller_unittest.cc (right): https://codereview.chromium.org/310913002/diff/100001/chrome/browser/ui/zoom/zoom_controller_unittest.cc#newcode88 chrome/browser/ui/zoom/zoom_controller_unittest.cc:88: TestZoomObserver zoom_observer_; Nit: Protected should be ...
6 years, 4 months ago (2014-07-30 19:08:15 UTC) #26
sarka
PTAL Thanks
6 years, 4 months ago (2014-07-30 19:41:53 UTC) #27
Alexei Svitkine (slow)
LGTM In the future, you should answer each comments directly through the web UI. Given ...
6 years, 4 months ago (2014-07-30 20:41:20 UTC) #28
Alexei Svitkine (slow)
The CQ bit was checked by asvitkine@chromium.org
6 years, 4 months ago (2014-07-30 20:41:24 UTC) #29
sarka
On 2014/07/30 20:41:20, Alexei Svitkine wrote: > LGTM > > In the future, you should ...
6 years, 4 months ago (2014-07-30 20:55:13 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/a.sarkar.arun@gmail.com/310913002/120001
6 years, 4 months ago (2014-07-30 20:59:35 UTC) #31
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_gpu on tryserver.chromium.gpu ...
6 years, 4 months ago (2014-07-30 21:18:08 UTC) #32
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-07-30 21:20:22 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: mac_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu/builds/35544) ios_dbg_simulator on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator/builds/1337) ios_rel_device ...
6 years, 4 months ago (2014-07-30 21:20:22 UTC) #34
sarka
On 2014/07/30 20:41:20, Alexei Svitkine wrote: > LGTM > > In the future, you should ...
6 years, 4 months ago (2014-07-31 15:38:24 UTC) #35
Alexei Svitkine (slow)
https://codereview.chromium.org/310913002/diff/140001/chrome/browser/ui/zoom/zoom_controller_unittest.cc File chrome/browser/ui/zoom/zoom_controller_unittest.cc (right): https://codereview.chromium.org/310913002/diff/140001/chrome/browser/ui/zoom/zoom_controller_unittest.cc#newcode249 chrome/browser/ui/zoom/zoom_controller_unittest.cc:249: for (int i = 0; i < 7; ++i) ...
6 years, 4 months ago (2014-07-31 15:41:56 UTC) #36
Alexei Svitkine (slow)
lgtm https://codereview.chromium.org/310913002/diff/140001/chrome/browser/ui/zoom/zoom_controller_unittest.cc File chrome/browser/ui/zoom/zoom_controller_unittest.cc (right): https://codereview.chromium.org/310913002/diff/140001/chrome/browser/ui/zoom/zoom_controller_unittest.cc#newcode33 chrome/browser/ui/zoom/zoom_controller_unittest.cc:33: using content::WebContentsTester; Do you need these using decls ...
6 years, 4 months ago (2014-07-31 15:43:33 UTC) #37
Alexei Svitkine (slow)
lgtm lgtm https://codereview.chromium.org/310913002/diff/140001/chrome/browser/ui/zoom/zoom_controller_unittest.cc File chrome/browser/ui/zoom/zoom_controller_unittest.cc (right): https://codereview.chromium.org/310913002/diff/140001/chrome/browser/ui/zoom/zoom_controller_unittest.cc#newcode33 chrome/browser/ui/zoom/zoom_controller_unittest.cc:33: using content::WebContentsTester; Do you need these using ...
6 years, 4 months ago (2014-07-31 15:43:34 UTC) #38
sarka
PTAL Thanks https://codereview.chromium.org/310913002/diff/140001/chrome/browser/ui/zoom/zoom_controller_unittest.cc File chrome/browser/ui/zoom/zoom_controller_unittest.cc (right): https://codereview.chromium.org/310913002/diff/140001/chrome/browser/ui/zoom/zoom_controller_unittest.cc#newcode158 chrome/browser/ui/zoom/zoom_controller_unittest.cc:158: On 2014/07/31 15:43:33, Alexei Svitkine wrote: > ...
6 years, 4 months ago (2014-07-31 16:02:03 UTC) #39
sarka
https://codereview.chromium.org/310913002/diff/140001/chrome/browser/ui/zoom/zoom_controller_unittest.cc File chrome/browser/ui/zoom/zoom_controller_unittest.cc (right): https://codereview.chromium.org/310913002/diff/140001/chrome/browser/ui/zoom/zoom_controller_unittest.cc#newcode33 chrome/browser/ui/zoom/zoom_controller_unittest.cc:33: using content::WebContentsTester; On 2014/07/31 15:43:33, Alexei Svitkine wrote: > ...
6 years, 4 months ago (2014-07-31 16:05:57 UTC) #40
sarka
On 2014/07/31 15:43:34, Alexei Svitkine wrote: > lgtm > > lgtm > > https://codereview.chromium.org/310913002/diff/140001/chrome/browser/ui/zoom/zoom_controller_unittest.cc > ...
6 years, 4 months ago (2014-07-31 18:50:09 UTC) #41
Alexei Svitkine (slow)
lgtm
6 years, 4 months ago (2014-07-31 19:26:35 UTC) #42
sarka
On 2014/07/31 19:26:35, Alexei Svitkine wrote: > lgtm I think I might have to re-do ...
6 years, 4 months ago (2014-07-31 20:07:46 UTC) #43
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_gpu on tryserver.chromium.gpu ...
6 years, 4 months ago (2014-07-31 20:19:43 UTC) #44
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-07-31 20:25:01 UTC) #45
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel/builds/1910)
6 years, 4 months ago (2014-07-31 20:25:03 UTC) #46
sarka
On 2014/07/31 19:26:35, Alexei Svitkine wrote: > lgtm Uploaded a patch that uses ZoomController::GetZoomPercent. Hopefully ...
6 years, 4 months ago (2014-08-01 04:49:21 UTC) #47
Alexei Svitkine (slow)
lgtm
6 years, 4 months ago (2014-08-01 17:00:20 UTC) #48
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.linux ...
6 years, 4 months ago (2014-08-01 22:33:14 UTC) #49
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-01 22:46:22 UTC) #50
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_clang_dbg/builds/2256)
6 years, 4 months ago (2014-08-01 22:46:24 UTC) #51
sarka
On 2014/08/01 17:00:20, Alexei Svitkine wrote: > lgtm Sorry for all these trouble. Made the ...
6 years, 4 months ago (2014-08-04 13:59:01 UTC) #52
Alexei Svitkine (slow)
https://codereview.chromium.org/310913002/diff/220001/chrome/browser/browser_commands_unittest.cc File chrome/browser/browser_commands_unittest.cc (right): https://codereview.chromium.org/310913002/diff/220001/chrome/browser/browser_commands_unittest.cc#newcode234 chrome/browser/browser_commands_unittest.cc:234: #if !defined(OS_ANDROID) I don't think this ifdef is needed ...
6 years, 4 months ago (2014-08-04 15:49:15 UTC) #53
sarka
On 2014/08/04 15:49:15, Alexei Svitkine wrote: > https://codereview.chromium.org/310913002/diff/220001/chrome/browser/browser_commands_unittest.cc > File chrome/browser/browser_commands_unittest.cc (right): > > https://codereview.chromium.org/310913002/diff/220001/chrome/browser/browser_commands_unittest.cc#newcode234 ...
6 years, 4 months ago (2014-08-04 15:59:07 UTC) #54
Alexei Svitkine (slow)
https://codereview.chromium.org/310913002/diff/240001/chrome/browser/ui/browser_command_controller.cc File chrome/browser/ui/browser_command_controller.cc (right): https://codereview.chromium.org/310913002/diff/240001/chrome/browser/ui/browser_command_controller.cc#newcode1133 chrome/browser/ui/browser_command_controller.cc:1133: // Update the zoom commands when an active tab ...
6 years, 4 months ago (2014-08-04 16:29:54 UTC) #55
sarka
On 2014/08/04 16:29:54, Alexei Svitkine wrote: > https://codereview.chromium.org/310913002/diff/240001/chrome/browser/ui/browser_command_controller.cc > File chrome/browser/ui/browser_command_controller.cc (right): > > https://codereview.chromium.org/310913002/diff/240001/chrome/browser/ui/browser_command_controller.cc#newcode1133 ...
6 years, 4 months ago (2014-08-04 18:44:48 UTC) #56
Alexei Svitkine (slow)
lgtm
6 years, 4 months ago (2014-08-04 18:47:00 UTC) #57
commit-bot: I haz the power
6 years, 4 months ago (2014-08-04 23:42:58 UTC) #58
Message was sent while issue was closed.
Change committed as 287401

Powered by Google App Engine
This is Rietveld 408576698