Build GPU channel by creating the viz::Gpu in the video capture utility
service, which is bind to viz::GpuClient of browser process. By this
way, video capture service can setup GPU channel to GPU process on
macOS platform to create shared images.
Bug: b:337294218
Change-Id: I8388baa24a7a3cafdfdbce6cea16ec931386adcd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5906709
Reviewed-by: Markus Handell <handellm@google.com>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Ahmed Moussa <ahmedmoussa@google.com>
Reviewed-by: Henrik Boström <hbos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1365112}
This is a reland of commit 96dbfbb77a
bool fields changed to std::optional<> to ensure they are initialized
in all cases. Fixes failures on msan builds.
Original change's description:
> Guard binding viz.mojom.gpu in utilities
>
> Adds WithGpuClient() option and associated passkeys to the service
> process host so that only allowed utilities can access the gpu
> service by directly binding viz.mojom.gpu.
>
> Bug: 328099369
> Change-Id: I6561bd5f2f5ec41241c8fe2582fab83ea37d880a
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5342901
> Reviewed-by: Tom Sepez <tsepez@chromium.org>
> Commit-Queue: Alex Gough <ajgo@chromium.org>
> Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1268729}
Bug: 328099369
Change-Id: I9ed8f30d28ef6b56ff27833a7df651d2599e0722
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5347643
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Alex Gough <ajgo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1269305}
Adds WithGpuClient() option and associated passkeys to the service
process host so that only allowed utilities can access the gpu
service by directly binding viz.mojom.gpu.
Bug: 328099369
Change-Id: I6561bd5f2f5ec41241c8fe2582fab83ea37d880a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5342901
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Alex Gough <ajgo@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1268729}
Build GPU channel by creating the viz::Gpu in the video capture utility
service, which is bind to viz::GpuClient of browser process. By this
way, video capture service can setup GPU channel to GPU process on
ChromeOS platform to create shared images.
Bug: b:314233378
Test: Verified that gpu buffer manager is available in utility process
Change-Id: I6e020b55efe6078fedc7739178f9f6202e4e8adb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5100650
Reviewed-by: Henrik Boström <hbos@chromium.org>
Commit-Queue: Sean Li <seannli@google.com>
Reviewed-by: Bo Liu <boliu@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1238439}
Build GPU channel by creating the viz::Gpu in the video capture utility
service, which is bind to viz::GpuClient of browser process. By this
way, video capture service can setup GPU channel to GPU process on
windows platform to create shared images.
Bug: chromium:1236801
Change-Id: I1773e1c2b93bd35dc7993f39c8561e7002946917
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4619072
Reviewed-by: Ilya Nikolaevskiy <ilnik@chromium.org>
Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org>
Reviewed-by: Bo Liu <boliu@chromium.org>
Reviewed-by: Henrik Boström <hbos@chromium.org>
Reviewed-by: Dominic Farolino <dom@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1163347}
Build GPU channel by creating the viz::Gpu in the video capture utility
service, which is bind to viz::GpuClient of browser process. By this
way, video capture service can setup GPU channel to GPU process.
Bug: 1425770
Change-Id: If01c694489f53809efed3cefa591759f4eb23478
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4347663
Reviewed-by: Ilya Nikolaevskiy <ilnik@chromium.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1135084}
In the out-of-process case, network service runs on the IO thread of a
utility process handling network-related tasks. See
services/network/README.md for more details.
To track the utility network service process, this CL enables sampling
profiler in this process. It updates the StackSamplingConfiguration to
turn on the switch of profiler in the network service process. Then when
the switch is on, ChromeContentUtilityClient will create and start a
profiler for the IO thread, and build a message pipe between the utility
network service process and the browser process to pass the collected
profile data.
If the switch is on, the procedure will be:
1. In the |UtilityMain| function, which is the mainline routine of a
utility process, a |ChildProcess| is created. This instance contains the
delegate of the IO thread and its task runner. Then
|ChromeContentUtilityClient::PostIOThreadCreated| will create
and start a profiler for the IO thread.
2. A |UtilityThreadImpl| instance is created in the |UtilityMain| as
well, it will be the main thread of the process. To initialize the
instance, |UtilityThreadImpl::Init| function is called. This function
only runs once in every utility process so, in this function,
|ChromeContentUtilityClient::UtilityThreadStarted| will create a message
pipe between the utility network service process and the browser process
to pass the collected profile data.
Note that there are some in-process utility threads run in other
processes, so please check the process type before setting up the
collector and pipe.
3. More specifically, it will create a |PendingReceiver| of
|CallStackProfileCollector|. And the browser process will receive and
handle this receiver. The path is:
|ChildThread::BindHostReceiver| =>
|UtilityProcessHost::BindHostReceiver| =>
|ChromeContentBrowserClient::BindUtilityHostReceiver|.
In the utility process side, |SetCollectorForChildProcess| is called to
supply the Service Manager's connector; and in the browser process side,
a |CallStackProfileCollector| will be created with the receiver.
Bug: 931432
Change-Id: I245f864089d82aee09c30a42c1606a93cf5ea1c6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2186614
Commit-Queue: Lingqi Chi <lingqi@google.com>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: Mike Wittman <wittman@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#777632}
With the Service Manager going away, the manifest files that previously
mediated access to Mojo services across processes are going away too.
Under the new system, various //content classes have methods that bind
mojo::Receiver<T> objects via GenericPendingReceiver. Since these call
sites control access to objects across a privilege boundary, they should
be under the SECURITY_OWNERS review system.
This pass splits out BindHostReceiver calls.
Bug: 1012033
Change-Id: I390a26af782953625b603270e3201535ff4ee9d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1880315
Reviewed-by: Yuchen Liu <yucliu@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Sean Topping <seantopping@chromium.org>
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#710095}