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

Issue 2563783002: ui + mus: Split ContextFactory into ContextFactory(Client) and ContextFactoryPrivate (Closed)

Created:
4 years ago by Fady Samuel
Modified:
4 years ago
CC:
cc-bugs_chromium.org, chromium-reviews, creis+watch_chromium.org, danakj+watch_chromium.org, darin-cc_chromium.org, jam, jbauman+watch_chromium.org, kalyank, miu+watch_chromium.org, nasko+codewatch_chromium.org, nona+watch_chromium.org, piman+watch_chromium.org, sadrul, shuchen+watch_chromium.org, James Su, tfarina, Ian Vollick, xjz+watch_chromium.org, yusukes+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

ui + mus: Split ContextFactory into ContextFactory(Client) and ContextFactoryPrivate ui::ContextFactory is an interface that contains both privileged and unprivileged operations. This CL dices ContextFactory into two, clearly delineating operations that can be performed by Mus clients, and operations that are reserved for mus-ws and mus-gpu and should be refactored. Mus clients other than Chrome do not need to inject a ContextFactoryPrivate into ui::Compositor. Chrome still needs ContextFactoryPrivate because it has its own display compositor for now. Once we complete the unified display compositor work across all Chrome clients, ContextFactoryPrivate can go away entirely. BUG=670710 TBR=reveman@chromium.org CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/a0bcfe1819277f44264ef31fdbdc3b59f1970144 Cr-Commit-Position: refs/heads/master@{#438447}

Patch Set 1 #

Patch Set 2 : Updated #

Total comments: 6

Patch Set 3 : Fix some unit tests #

Patch Set 4 : Fix some unit tests #

Patch Set 5 : Fix android and formatting #

Patch Set 6 : Fix more build targets #

Patch Set 7 : Fix X11 #

Patch Set 8 : Updated #

Patch Set 9 : More unit test fixes #

Patch Set 10 : Updated #

Patch Set 11 : Fix more unit test issues #

Patch Set 12 : Use ContextFactoryPrivate in more places #

Patch Set 13 : Updated #

Patch Set 14 : Updated #

Patch Set 15 : Fixed more tests #

Patch Set 16 : Fix some Mac tests #

Total comments: 7

Patch Set 17 : Updated #

Patch Set 18 : Restore mash #

Unified diffs Side-by-side diffs Delta from patch set Stats (+482 lines, -332 lines) Patch
M ash/display/mirror_window_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +6 lines, -4 lines 0 comments Download
M ash/shell.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M ash/shell/content/client/shell_browser_main_parts.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M ash/shell_init_params.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M ash/test/ash_test_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/ui/ash/ash_init.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/chrome_views_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 15 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/views/chrome_views_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 15 16 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/test/base/view_event_test_base.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +8 lines, -3 lines 0 comments Download
M chrome/test/base/view_event_test_platform_part.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +4 lines, -1 line 0 comments Download
M chrome/test/base/view_event_test_platform_part_chromeos.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +10 lines, -5 lines 0 comments Download
M chrome/test/base/view_event_test_platform_part_default.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +8 lines, -4 lines 0 comments Download
M components/exo/surface.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +8 lines, -3 lines 0 comments Download
M components/exo/surface_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M content/browser/browser_main_loop.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/compositor/gpu_process_transport_factory.h View 3 chunks +13 lines, -10 lines 0 comments Download
M content/browser/compositor/gpu_process_transport_factory.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/compositor/image_transport_factory.h View 2 chunks +6 lines, -0 lines 0 comments Download
M content/browser/compositor/reflector_impl_unittest.cc View 1 2 2 chunks +8 lines, -4 lines 0 comments Download
M content/browser/compositor/software_browser_compositor_output_surface_unittest.cc View 1 2 1 chunk +7 lines, -4 lines 0 comments Download
M content/browser/compositor/software_output_device_ozone_unittest.cc View 1 2 1 chunk +6 lines, -4 lines 0 comments Download
M content/browser/compositor/surface_utils.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/compositor/test/no_transport_image_transport_factory.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/compositor/test/no_transport_image_transport_factory.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/context_factory.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/frame_host/render_widget_host_view_guest_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/media/capture/desktop_capture_device_aura_unittest.cc View 1 2 1 chunk +6 lines, -4 lines 0 comments Download
M content/browser/renderer_host/browser_compositor_view_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/delegated_frame_host.cc View 3 chunks +9 lines, -7 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura_unittest.cc View 1 2 4 chunks +5 lines, -4 lines 0 comments Download
M content/public/browser/context_factory.h View 2 chunks +7 lines, -0 lines 0 comments Download
M content/public/test/test_renderer_host.cc View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M extensions/shell/browser/shell_browser_main_parts.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -0 lines 0 comments Download
M mash/test/mash_test_suite.cc View 1 2 17 1 chunk +8 lines, -2 lines 0 comments Download
M ui/aura/env.h View 3 chunks +10 lines, -0 lines 0 comments Download
M ui/aura/env.cc View 1 chunk +2 lines, -1 line 0 comments Download
M ui/aura/mus/mus_context_factory.h View 1 2 3 2 chunks +0 lines, -19 lines 0 comments Download
M ui/aura/mus/mus_context_factory.cc View 1 2 3 4 3 chunks +1 line, -40 lines 0 comments Download
M ui/aura/test/aura_test_base.cc View 1 2 3 1 chunk +5 lines, -3 lines 0 comments Download
M ui/aura/test/aura_test_helper.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M ui/aura/test/aura_test_helper.cc View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M ui/aura/window_tree_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +4 lines, -2 lines 0 comments Download
M ui/compositor/compositor.h View 1 4 chunks +44 lines, -33 lines 0 comments Download
M ui/compositor/compositor.cc View 1 9 10 12 chunks +44 lines, -18 lines 0 comments Download
M ui/compositor/compositor_unittest.cc View 1 2 1 chunk +6 lines, -3 lines 0 comments Download
M ui/compositor/layer_animator_unittest.cc View 1 2 2 chunks +14 lines, -10 lines 0 comments Download
M ui/compositor/layer_owner_unittest.cc View 1 2 1 chunk +7 lines, -3 lines 0 comments Download
M ui/compositor/layer_unittest.cc View 1 2 2 chunks +13 lines, -8 lines 0 comments Download
M ui/compositor/test/context_factories_for_test.h View 1 2 2 chunks +6 lines, -1 line 0 comments Download
M ui/compositor/test/context_factories_for_test.cc View 1 2 2 chunks +6 lines, -2 lines 0 comments Download
M ui/compositor/test/in_process_context_factory.h View 1 chunk +2 lines, -1 line 0 comments Download
M ui/compositor/test/test_compositor_host.h View 1 2 1 chunk +5 lines, -2 lines 0 comments Download
M ui/compositor/test/test_compositor_host_android.cc View 1 2 3 4 2 chunks +9 lines, -4 lines 0 comments Download
M ui/compositor/test/test_compositor_host_mac.mm View 1 2 3 4 5 6 7 8 9 3 chunks +12 lines, -7 lines 0 comments Download
M ui/compositor/test/test_compositor_host_ozone.cc View 1 2 3 chunks +11 lines, -5 lines 0 comments Download
M ui/compositor/test/test_compositor_host_win.cc View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -3 lines 0 comments Download
M ui/compositor/test/test_compositor_host_x11.cc View 1 2 3 4 5 6 4 chunks +13 lines, -5 lines 0 comments Download
M ui/keyboard/keyboard_controller_unittest.cc View 1 2 3 4 5 1 chunk +6 lines, -3 lines 0 comments Download
M ui/snapshot/snapshot_aura_unittest.cc View 1 2 3 4 5 1 chunk +6 lines, -3 lines 0 comments Download
M ui/views/cocoa/bridged_native_widget.mm View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -2 lines 0 comments Download
M ui/views/mus/surface_context_factory.h View 1 2 3 2 chunks +0 lines, -19 lines 0 comments Download
M ui/views/mus/surface_context_factory.cc View 1 2 3 4 3 chunks +1 line, -43 lines 0 comments Download
M ui/views/test/scoped_views_test_helper.cc View 1 2 3 4 5 6 7 8 2 chunks +15 lines, -4 lines 0 comments Download
M ui/views/test/test_views_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +7 lines, -0 lines 0 comments Download
M ui/views/test/test_views_delegate_aura.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +10 lines, -2 lines 0 comments Download
M ui/views/test/test_views_delegate_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +6 lines, -2 lines 0 comments Download
M ui/views/test/views_test_helper.h View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -2 lines 0 comments Download
M ui/views/test/views_test_helper_aura.h View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -1 line 0 comments Download
M ui/views/test/views_test_helper_aura.cc View 1 2 3 4 5 6 7 8 2 chunks +13 lines, -7 lines 0 comments Download
M ui/views/test/views_test_helper_mac.mm View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -2 lines 0 comments Download
M ui/views/views_delegate.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M ui/views/views_delegate.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M ui/views_content_client/views_content_client_main_parts.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 94 (72 generated)
Fady Samuel
This CL is still WIP but I was hoping to get some early feedback, Sadrul, ...
4 years ago (2016-12-08 22:01:02 UTC) #4
Fady Samuel
This CL is still WIP but I was hoping to get some early feedback, Sadrul, ...
4 years ago (2016-12-08 22:01:03 UTC) #5
rjkroege
the general approach looks reasonable to me. https://codereview.chromium.org/2563783002/diff/20001/content/browser/context_factory.cc File content/browser/context_factory.cc (right): https://codereview.chromium.org/2563783002/diff/20001/content/browser/context_factory.cc#newcode16 content/browser/context_factory.cc:16: ui::ContextFactoryPrivate* GetContextFactoryPrivate() ...
4 years ago (2016-12-08 23:42:59 UTC) #12
sadrul
https://codereview.chromium.org/2563783002/diff/20001/ui/compositor/compositor.cc File ui/compositor/compositor.cc (right): https://codereview.chromium.org/2563783002/diff/20001/ui/compositor/compositor.cc#newcode251 ui/compositor/compositor.cc:251: if (!context_factory_private_) Probably should be DCHECK()?
4 years ago (2016-12-09 00:11:03 UTC) #13
Fady Samuel
PTAL Sadrul! This is now mostly ready for review. I still have some Mac things ...
4 years ago (2016-12-13 19:13:59 UTC) #61
Fady Samuel
PTAL Sadrul! This is now mostly ready for review. I still have some Mac things ...
4 years ago (2016-12-13 19:13:59 UTC) #62
sky
https://codereview.chromium.org/2563783002/diff/300001/ui/aura/env.h File ui/aura/env.h (right): https://codereview.chromium.org/2563783002/diff/300001/ui/aura/env.h#newcode91 ui/aura/env.h:91: void set_context_factory_private( Are these temporary? I wouldn't expect a ...
4 years ago (2016-12-13 21:29:54 UTC) #66
Fady Samuel
https://codereview.chromium.org/2563783002/diff/300001/ui/aura/env.h File ui/aura/env.h (right): https://codereview.chromium.org/2563783002/diff/300001/ui/aura/env.h#newcode91 ui/aura/env.h:91: void set_context_factory_private( On 2016/12/13 21:29:54, sky wrote: > Are ...
4 years ago (2016-12-13 21:55:58 UTC) #67
sky
Ok, LGTM
4 years ago (2016-12-13 23:25:29 UTC) #70
rjkroege
lgtm with nits https://codereview.chromium.org/2563783002/diff/300001/components/exo/surface.cc File components/exo/surface.cc (right): https://codereview.chromium.org/2563783002/diff/300001/components/exo/surface.cc#newcode150 components/exo/surface.cc:150: ->context_factory_private() exo should not require this. ...
4 years ago (2016-12-14 00:15:31 UTC) #71
jam
lgtm for content files outside content/browser/compositor/, for those ones please get specific owner
4 years ago (2016-12-14 00:46:05 UTC) #72
Fady Samuel
+jbauman@ for content/browser/compositor
4 years ago (2016-12-14 00:49:05 UTC) #74
sadrul
lgtm
4 years ago (2016-12-14 00:57:34 UTC) #75
jbauman
lgtm for content/browser/compositor/
4 years ago (2016-12-14 01:06:22 UTC) #76
Fady Samuel
+reveman@ for exo change (TBR'ing since this is a small mechanical change that matches changes ...
4 years ago (2016-12-14 01:27:12 UTC) #78
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2563783002/320001
4 years ago (2016-12-14 01:28:22 UTC) #82
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/288440)
4 years ago (2016-12-14 02:33:51 UTC) #84
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2563783002/340001
4 years ago (2016-12-14 04:43:37 UTC) #87
Fady Samuel
Filed a bug: https://bugs.chromium.org/p/chromium/issues/detail?id=674001 There's a bit of work to do there. I'll address in ...
4 years ago (2016-12-14 04:51:02 UTC) #88
commit-bot: I haz the power
Committed patchset #18 (id:340001)
4 years ago (2016-12-14 06:22:42 UTC) #91
commit-bot: I haz the power
Patchset 18 (id:??) landed as https://crrev.com/a0bcfe1819277f44264ef31fdbdc3b59f1970144 Cr-Commit-Position: refs/heads/master@{#438447}
4 years ago (2016-12-14 06:25:15 UTC) #93
reveman
4 years ago (2016-12-14 19:01:17 UTC) #94
Message was sent while issue was closed.
lgtm

Powered by Google App Engine
This is Rietveld 408576698