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

Issue 2979933002: Add support to the UI Service to run it inside the browser's process. (Closed)

Created:
3 years, 5 months ago by mfomitchev
Modified:
3 years, 5 months ago
Reviewers:
sky
CC:
chromium-reviews, rjkroege, kalyank, sadrul
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Add support to the UI Service to run it insider browser's process. When UI Service runs inside the browser process in its own separate thread, there is a few things it needs to do differently: 1. It shouldn't set its Screen as a global singleton. 2. It shouldn't set its ClientNativePixmapFactory as a global singleton. 3. It can't access the ResourceBundle from its own thread - that can only be done from the browser thread. The third point is the source of most of the complexity in this CL. UI Service needs to manipulate the cursor, which is done through the ui::ImageCursors object, which needs to load resources. Since resources can't be loaded on the UI Service's thread, a mechanism is introduced to let the UI Service do this by posting tasks to the browser's thread task runner, which is passed into the UI Service's constructor. This CL doesn't contain browser-side changes to run the UI Service in-process. BUG=722527 Review-Url: https://codereview.chromium.org/2979933002 Cr-Commit-Position: refs/heads/master@{#486509} Committed: https://chromium.googlesource.com/chromium/src/+/04cdb9269087e39efc12fc8dc21184bce075d72d

Patch Set 1 #

Patch Set 2 : Set thread name, temp merge of fix from https://codereview.chromium.org/2976923002 #

Patch Set 3 : Cosmetic changes #

Patch Set 4 : Rebase #

Total comments: 16

Patch Set 5 : Addressing review feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+552 lines, -44 lines) Patch
M services/ui/common/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
A services/ui/common/image_cursors_set.h View 1 2 3 4 1 chunk +37 lines, -0 lines 0 comments Download
A services/ui/common/image_cursors_set.cc View 1 2 3 4 1 chunk +37 lines, -0 lines 0 comments Download
M services/ui/display/screen_manager_forwarding.h View 2 chunks +11 lines, -1 line 0 comments Download
M services/ui/display/screen_manager_forwarding.cc View 1 chunk +7 lines, -4 lines 0 comments Download
M services/ui/main.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M services/ui/service.h View 1 2 3 4 6 chunks +34 lines, -2 lines 0 comments Download
M services/ui/service.cc View 1 2 3 4 10 chunks +71 lines, -7 lines 0 comments Download
M services/ui/ws/BUILD.gn View 1 chunk +3 lines, -0 lines 0 comments Download
M services/ui/ws/display.cc View 1 chunk +2 lines, -1 line 0 comments Download
M services/ui/ws/platform_display.h View 2 chunks +3 lines, -1 line 0 comments Download
M services/ui/ws/platform_display.cc View 3 chunks +5 lines, -3 lines 0 comments Download
M services/ui/ws/platform_display_default.h View 3 chunks +4 lines, -3 lines 0 comments Download
M services/ui/ws/platform_display_default.cc View 6 chunks +15 lines, -11 lines 0 comments Download
M services/ui/ws/platform_display_default_unittest.cc View 3 chunks +11 lines, -2 lines 0 comments Download
M services/ui/ws/test_utils.h View 2 chunks +2 lines, -0 lines 0 comments Download
M services/ui/ws/test_utils.cc View 4 chunks +33 lines, -1 line 0 comments Download
A services/ui/ws/threaded_image_cursors.h View 1 2 3 4 1 chunk +93 lines, -0 lines 0 comments Download
A services/ui/ws/threaded_image_cursors.cc View 1 2 3 4 1 chunk +134 lines, -0 lines 0 comments Download
A services/ui/ws/threaded_image_cursors_factory.h View 1 chunk +23 lines, -0 lines 0 comments Download
M services/ui/ws/user_display_manager.cc View 4 chunks +14 lines, -7 lines 0 comments Download
M services/ui/ws/window_server.h View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download
M services/ui/ws/window_server.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M services/ui/ws/window_server_delegate.h View 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (18 generated)
mfomitchev
PTAL: Part one of in-process Mus.
3 years, 5 months ago (2017-07-13 02:04:05 UTC) #9
sky
https://codereview.chromium.org/2979933002/diff/60001/services/ui/common/image_cursors_set.h File services/ui/common/image_cursors_set.h (right): https://codereview.chromium.org/2979933002/diff/60001/services/ui/common/image_cursors_set.h#newcode11 services/ui/common/image_cursors_set.h:11: #include "base/memory/weak_ptr.h" inlucde base/macros too. https://codereview.chromium.org/2979933002/diff/60001/services/ui/common/image_cursors_set.h#newcode21 services/ui/common/image_cursors_set.h:21: virtual ~ImageCursorsSet(); ...
3 years, 5 months ago (2017-07-13 17:14:58 UTC) #16
mfomitchev
https://codereview.chromium.org/2979933002/diff/60001/services/ui/common/image_cursors_set.h File services/ui/common/image_cursors_set.h (right): https://codereview.chromium.org/2979933002/diff/60001/services/ui/common/image_cursors_set.h#newcode11 services/ui/common/image_cursors_set.h:11: #include "base/memory/weak_ptr.h" On 2017/07/13 17:14:58, sky wrote: > inlucde ...
3 years, 5 months ago (2017-07-13 17:53:06 UTC) #17
sky
LGTM
3 years, 5 months ago (2017-07-13 20:35:07 UTC) #18
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/2979933002/80001
3 years, 5 months ago (2017-07-13 20:41:32 UTC) #20
commit-bot: I haz the power
3 years, 5 months ago (2017-07-13 22:53:47 UTC) #24
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/04cdb9269087e39efc12fc8dc211...

Powered by Google App Engine
This is Rietveld 408576698