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

Issue 769593003: Move ZoomObserver, ZoomController and ZoomEventManager to components/. (Closed)

Created:
6 years ago by wjmaclean
Modified:
6 years ago
CC:
aandrey+blink_chromium.org, benquan, chromium-apps-reviews_chromium.org, chromium-reviews, dbeam+watch-ntp_chromium.org, dcheng, devtools-reviews_chromium.org, Dane Wallinga, Dmitry Titov, dyu1, estade+watch_chromium.org, extensions-reviews_chromium.org, Ilya Sherman, jennb, jianli, paulirish+reviews_chromium.org, pedrosimonetti+watch_chromium.org, pfeldman, rouslan+autofillwatch_chromium.org, tfarina, vsevik, yurys
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Move ZoomObserver, ZoomController and ZoomEventManager to components/. This CL moves the three classes into components, namespace ui_zoom, and moves their associated source files into components/ui/zoom so that they can be used in non-chrome configurations. BUG=none TBR=willchan@chromium.org chrome/browser/profiles TBR=fsamuel@chromium.org */web_view/* TBR=estade@chromium.org chrome/browser/ui/autofill TBR=pkasting@chromium.org chrome/browser/ui not covered above TBR=dgozman@chromium.org chrome/browser/devtools TBR=rsesek@chromium.org chrome/browser/browser_commands_unittest.cc TBR=sky@chromium.org chrome/browser/renderer_preferences_util.cc Committed: https://crrev.com/7f63c6b94ee1d470791c243c4941c55315416171 Cr-Commit-Position: refs/heads/master@{#307470}

Patch Set 1 #

Patch Set 2 : Add OWNERS file. #

Patch Set 3 : Mac build fix #4. #

Total comments: 1

Patch Set 4 : Move ui_zoom stuff to components instead. #

Total comments: 8

Patch Set 5 : Revise GN build files, DEPS files, rockot@'s comments. #

Patch Set 6 : Address asvitkine@'s comments. #

Total comments: 13

Patch Set 7 : More GN fixes, address jamescook@'s comments. #

Patch Set 8 : Implement export macros. #

Patch Set 9 : Change namespace to ui_zoom, properly export WebContentsUserData::kLocatorKey. #

Patch Set 10 : Improve dependencies in ui_zoom.gypi #

Patch Set 11 : Fix typo: 'ips' -> 'ipc' #

Patch Set 12 : Fix namespace error in Mac zoom_decoration.h. #

Patch Set 13 : [Experiment] Windows compile: kLocatorKey 'int' -> 'static int'. #

Patch Set 14 : [Experiment] Use static_library instead of component. #

Patch Set 15 : Roll our own user data support. #

Patch Set 16 : Make it static_library, ditch export macros. #

Total comments: 4

Patch Set 17 : Remove obsolete defines in build files. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+430 lines, -842 lines) Patch
M chrome/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/DEPS View 1 2 3 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 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/chrome_page_zoom.cc View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/devtools/devtools_window.cc View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/extensions/api/tabs/tabs_api.h View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/tabs/tabs_api.cc View 1 2 3 4 5 6 7 8 5 chunks +6 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/tabs/tabs_event_router.h View 1 2 3 4 5 6 7 8 3 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/extensions/api/tabs/tabs_event_router.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/extensions/api/tabs/tabs_test.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h View 1 2 3 4 5 6 7 8 3 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.cc View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/profiles/host_zoom_map_browsertest.cc View 1 2 3 4 5 6 7 8 3 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/profiles/off_the_record_profile_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/profiles/profile_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/renderer_preferences_util.cc View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/apps/chrome_app_delegate.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/autofill/chrome_autofill_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/ui/autofill/chrome_autofill_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/browser.h View 1 2 3 4 5 6 7 8 3 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/ui/browser.cc View 1 2 3 4 5 6 7 8 4 chunks +6 lines, -4 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 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/browser_commands.cc View 1 2 3 4 5 6 7 8 3 chunks +7 lines, -4 lines 0 comments Download
M chrome/browser/ui/cocoa/browser/zoom_bubble_controller.mm View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -2 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 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/location_bar/zoom_decoration.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm View 1 2 3 4 5 6 7 8 4 chunks +16 lines, -7 lines 0 comments Download
M chrome/browser/ui/cocoa/location_bar/zoom_decoration_unittest.mm View 1 2 3 4 5 6 7 8 3 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.mm View 1 2 3 4 5 6 7 8 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/panels/panel_host.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/tab_helpers.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/toolbar/wrench_menu_model.cc View 1 2 3 4 5 6 7 8 4 chunks +7 lines, -7 lines 0 comments Download
M chrome/browser/ui/views/apps/chrome_native_app_window_views.cc View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/location_bar/location_bar_view.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/location_bar/zoom_bubble_view.cc View 1 2 3 4 5 6 7 8 5 chunks +15 lines, -13 lines 0 comments Download
M chrome/browser/ui/views/location_bar/zoom_view.h View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/ui/views/location_bar/zoom_view.cc View 1 2 3 4 5 6 7 8 3 chunks +12 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/toolbar/wrench_menu.cc View 1 2 3 4 5 6 7 8 3 chunks +10 lines, -7 lines 0 comments Download
M chrome/browser/ui/webui/constrained_web_dialog_delegate_base.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/ntp/ntp_login_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/zoom/chrome_zoom_level_otr_delegate.h View 1 2 3 4 5 6 7 8 3 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/ui/zoom/chrome_zoom_level_otr_delegate.cc View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -4 lines 0 comments Download
M chrome/browser/ui/zoom/chrome_zoom_level_prefs.h View 1 2 3 4 5 6 7 8 3 chunks +10 lines, -7 lines 0 comments Download
M chrome/browser/ui/zoom/chrome_zoom_level_prefs.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
D chrome/browser/ui/zoom/zoom_controller.h View 1 chunk +0 lines, -168 lines 0 comments Download
D chrome/browser/ui/zoom/zoom_controller.cc View 1 chunk +0 lines, -299 lines 0 comments Download
M chrome/browser/ui/zoom/zoom_controller_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +7 lines, -15 lines 0 comments Download
M chrome/browser/ui/zoom/zoom_controller_unittest.cc View 1 2 3 4 5 6 7 8 8 chunks +44 lines, -13 lines 0 comments Download
D chrome/browser/ui/zoom/zoom_event_manager.h View 1 chunk +0 lines, -53 lines 0 comments Download
D chrome/browser/ui/zoom/zoom_event_manager.cc View 1 chunk +0 lines, -35 lines 0 comments Download
D chrome/browser/ui/zoom/zoom_observer.h View 1 chunk +0 lines, -25 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 3 chunks +1 line, -5 lines 0 comments Download
M components/BUILD.gn View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M components/components.gyp View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
A + components/ui/zoom/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +9 lines, -5 lines 0 comments Download
A + components/ui/zoom/DEPS View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
A + components/ui/zoom/OWNERS View 1 2 3 0 chunks +-1 lines, --1 lines 0 comments Download
A + components/ui/zoom/zoom_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 8 chunks +35 lines, -16 lines 0 comments Download
A + components/ui/zoom/zoom_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 14 chunks +59 lines, -60 lines 0 comments Download
A + components/ui/zoom/zoom_event_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +7 lines, -3 lines 0 comments Download
A + components/ui/zoom/zoom_event_manager.cc View 1 2 3 4 5 6 7 8 4 chunks +7 lines, -2 lines 0 comments Download
A + components/ui/zoom/zoom_observer.h View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -7 lines 0 comments Download
A + components/ui_zoom.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +11 lines, -8 lines 0 comments Download
M extensions/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M extensions/browser/DEPS View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
A extensions/browser/extension_zoom_request_client.h View 1 2 3 4 5 6 7 8 1 chunk +35 lines, -0 lines 0 comments Download
A extensions/browser/extension_zoom_request_client.cc View 1 2 3 1 chunk +17 lines, -0 lines 0 comments Download
M extensions/extensions.gyp View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 38 (10 generated)
wjmaclean
Please review changes in: chrome/browser/extensions/* extensions/*
6 years ago (2014-12-02 20:43:16 UTC) #5
Ken Rockot(use gerrit already)
On 2014/12/02 20:43:16, wjmaclean wrote: > Please review changes in: > chrome/browser/extensions/* > extensions/* This ...
6 years ago (2014-12-02 20:49:33 UTC) #6
wjmaclean
fsamuel@chromium.org: Please review changes in zoom_controller_unittest.cc asvitkine@chromium.org: Please review changes in chrome/browser/ui/cocoa - minor changes ...
6 years ago (2014-12-02 20:50:57 UTC) #8
wjmaclean
pkasting@chromium.org: Please review changes in zoom_view.cc - minor changes re loading resource image ids.
6 years ago (2014-12-02 20:53:04 UTC) #10
Fady Samuel
On 2014/12/02 20:49:33, Ken Rockot wrote: > On 2014/12/02 20:43:16, wjmaclean wrote: > > Please ...
6 years ago (2014-12-02 20:58:40 UTC) #11
Peter Kasting
c/b/ui/views/location_bar LGTM https://codereview.chromium.org/769593003/diff/40002/chrome/browser/ui/views/location_bar/zoom_view.cc File chrome/browser/ui/views/location_bar/zoom_view.cc (right): https://codereview.chromium.org/769593003/diff/40002/chrome/browser/ui/views/location_bar/zoom_view.cc#newcode48 chrome/browser/ui/views/location_bar/zoom_view.cc:48: } Nit: Shorter: int image_name = IDR_ZOOM_NORMAL; ...
6 years ago (2014-12-02 21:04:54 UTC) #12
Ken Rockot(use gerrit already)
Maybe not, but I don't think that justifies putting it in extensions. In general I'd ...
6 years ago (2014-12-02 21:07:05 UTC) #13
Evan Stade
On 2014/12/02 20:49:33, Ken Rockot wrote: > On 2014/12/02 20:43:16, wjmaclean wrote: > > Please ...
6 years ago (2014-12-02 21:07:58 UTC) #14
wjmaclean
On 2014/12/02 21:04:54, Peter Kasting wrote: > c/b/ui/views/location_bar LGTM > > https://codereview.chromium.org/769593003/diff/40002/chrome/browser/ui/views/location_bar/zoom_view.cc > File chrome/browser/ui/views/location_bar/zoom_view.cc ...
6 years ago (2014-12-02 21:09:23 UTC) #15
wjmaclean
On 2014/12/02 21:07:05, Ken Rockot wrote: > Maybe not, but I don't think that justifies ...
6 years ago (2014-12-02 21:19:45 UTC) #16
wjmaclean
jochen@chromium.org: Please review changes in components/ PTAL as this CL now moves the zoom code ...
6 years ago (2014-12-03 21:32:13 UTC) #18
Ken Rockot(use gerrit already)
Thank you for doing this in components. All extensions code LGTM. https://codereview.chromium.org/769593003/diff/110001/components/ui/zoom/zoom_controller.cc File components/ui/zoom/zoom_controller.cc (right): ...
6 years ago (2014-12-03 21:42:48 UTC) #19
wjmaclean
jamescook@chromium.org: Please review changes in extensions/browser/DEPS https://codereview.chromium.org/769593003/diff/110001/components/ui/zoom/zoom_controller.cc File components/ui/zoom/zoom_controller.cc (right): https://codereview.chromium.org/769593003/diff/110001/components/ui/zoom/zoom_controller.cc#newcode77 components/ui/zoom/zoom_controller.cc:77: // An extension ...
6 years ago (2014-12-04 15:04:30 UTC) #21
Alexei Svitkine (slow)
cocoa lgtm with a nit https://codereview.chromium.org/769593003/diff/110001/chrome/browser/ui/cocoa/location_bar/zoom_decoration_unittest.mm File chrome/browser/ui/cocoa/location_bar/zoom_decoration_unittest.mm (right): https://codereview.chromium.org/769593003/diff/110001/chrome/browser/ui/cocoa/location_bar/zoom_decoration_unittest.mm#newcode9 chrome/browser/ui/cocoa/location_bar/zoom_decoration_unittest.mm:9: using components::ZoomController; Nit: Just ...
6 years ago (2014-12-04 15:52:02 UTC) #22
wjmaclean
https://codereview.chromium.org/769593003/diff/110001/chrome/browser/ui/cocoa/location_bar/zoom_decoration_unittest.mm File chrome/browser/ui/cocoa/location_bar/zoom_decoration_unittest.mm (right): https://codereview.chromium.org/769593003/diff/110001/chrome/browser/ui/cocoa/location_bar/zoom_decoration_unittest.mm#newcode9 chrome/browser/ui/cocoa/location_bar/zoom_decoration_unittest.mm:9: using components::ZoomController; On 2014/12/04 15:52:02, Alexei Svitkine wrote: > ...
6 years ago (2014-12-04 15:57:45 UTC) #23
James Cook
LGTM with nits https://codereview.chromium.org/769593003/diff/150001/components/ui/zoom/zoom_event_manager.cc File components/ui/zoom/zoom_event_manager.cc (right): https://codereview.chromium.org/769593003/diff/150001/components/ui/zoom/zoom_event_manager.cc#newcode40 components/ui/zoom/zoom_event_manager.cc:40: } // namespace extensions ditto https://codereview.chromium.org/769593003/diff/150001/components/ui/zoom/zoom_event_manager.h ...
6 years ago (2014-12-04 17:17:16 UTC) #24
wjmaclean
https://codereview.chromium.org/769593003/diff/150001/components/ui/zoom/zoom_event_manager.cc File components/ui/zoom/zoom_event_manager.cc (right): https://codereview.chromium.org/769593003/diff/150001/components/ui/zoom/zoom_event_manager.cc#newcode40 components/ui/zoom/zoom_event_manager.cc:40: } // namespace extensions On 2014/12/04 17:17:16, James Cook ...
6 years ago (2014-12-04 18:27:17 UTC) #25
wjmaclean
jochen@ - Will you be able to look at this? If so, I'd appreciate your ...
6 years ago (2014-12-04 22:41:48 UTC) #26
wjmaclean
On 2014/12/04 22:41:48, wjmaclean wrote: > jochen@ - Will you be able to look at ...
6 years ago (2014-12-04 22:55:40 UTC) #27
Evan Stade
autofill lgtm
6 years ago (2014-12-05 02:28:06 UTC) #29
jochen (gone - plz use gerrit)
have you considered to just make this a static library instead of going through the ...
6 years ago (2014-12-08 12:12:18 UTC) #30
wjmaclean
On 2014/12/08 12:12:18, jochen (slow) wrote: > have you considered to just make this a ...
6 years ago (2014-12-08 14:04:32 UTC) #31
wjmaclean
Using static_library now ... PTAL?
6 years ago (2014-12-08 16:51:38 UTC) #32
jochen (gone - plz use gerrit)
lgtm https://codereview.chromium.org/769593003/diff/340001/components/ui/zoom/BUILD.gn File components/ui/zoom/BUILD.gn (right): https://codereview.chromium.org/769593003/diff/340001/components/ui/zoom/BUILD.gn#newcode14 components/ui/zoom/BUILD.gn:14: defines = [ "UI_ZOOM_IMPLEMENTATION"] same https://codereview.chromium.org/769593003/diff/340001/components/ui_zoom.gypi File components/ui_zoom.gypi ...
6 years ago (2014-12-09 13:52:29 UTC) #33
wjmaclean
https://codereview.chromium.org/769593003/diff/340001/components/ui/zoom/BUILD.gn File components/ui/zoom/BUILD.gn (right): https://codereview.chromium.org/769593003/diff/340001/components/ui/zoom/BUILD.gn#newcode14 components/ui/zoom/BUILD.gn:14: defines = [ "UI_ZOOM_IMPLEMENTATION"] On 2014/12/09 13:52:28, jochen (slow) ...
6 years ago (2014-12-09 13:59:23 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/769593003/360001
6 years ago (2014-12-09 14:00:03 UTC) #36
commit-bot: I haz the power
Committed patchset #17 (id:360001)
6 years ago (2014-12-09 15:00:06 UTC) #37
commit-bot: I haz the power
6 years ago (2014-12-09 15:00:55 UTC) #38
Message was sent while issue was closed.
Patchset 17 (id:??) landed as
https://crrev.com/7f63c6b94ee1d470791c243c4941c55315416171
Cr-Commit-Position: refs/heads/master@{#307470}

Powered by Google App Engine
This is Rietveld 408576698