0
Commit Graph

448 Commits

Author SHA1 Message Date
Emil Vardar
b636ba5794 Remove flag enable-webrtc-srtp-encrypted-headers.
Bug: chromium:40623740
Change-Id: I3edc29f76fb84a30e5bc87b264b49b8d8e51306c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5866212
Reviewed-by: Henrik Boström <hbos@chromium.org>
Reviewed-by: Erik Språng <sprang@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Emil Vardar (xWF) <vardar@google.com>
Cr-Commit-Position: refs/heads/main@{#1368828}
2024-10-15 16:39:05 +00:00
Maggie Chen
db98dac84d "Context lost" handling in CanvasResourceProviderSharedBitmap
The GpuChannel is lost in the GPU crash. The GpuChannelLost observer NotifyGpuContextLost to restore the context and recreate Canvas resource
provider.

Remove RendererBlinkPlatformImpl::CreateSharedImageInterfaceProvider().
SharedImageInterfaceProvider is now created directly inside
SharedGpuContext. It doesn't need to use the platform proxy.Also move
webgraphics_shared_image_interface_provider_impl.cc from
content/renderer to third_party/blink/renderer/platform/graphics/gpu
because it's directly called from Blink/ instead of content/.

Update SharedGpuContext::CreateSharedImageInterfaceProviderIfNeeded()
so WebGraphicsSharedImageInterfaceProviderImpl ctor and the
GpuChannelLost notification is called on the same thread where
SharedImageInterfaceProvider is requested.



Bug:40064122

Change-Id: Ieea951b7ff6fb214e821f84d9a945280f2822119
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5770840
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Commit-Queue: Maggie Chen <magchen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1345023}
2024-08-21 20:20:47 +00:00
Thomas Lukaszewicz
791db24354 Restrict use of GeneratedCodeCache to specific WebUI requests
There is an existing WebUICodeCache flag (defined in
content/public/common/content_features) that is used to enable code
caching for WebUI scripts for all chrome:// and chrome-untrusted://
resources.

This is currently disabled by default as experiments showed mixed
results for performance improvements (different impacts across
different WebUI pages, some improved significantly some regressed).

This CL introduces a WebUIRestrictedCodeCache param that can be
enabled alongside the existing WebUICodeCache flag. When enabled
this param restricts use of the generated code cache for WebUI to a
subset of targeted scripts that are expected to benefit most from
the code caching feature. Initially this will only target Tab
Search script resources.

blink::Platform::ShouldUseCodeCacheWithHashing has been added to
allow embedders to conditionally restrict which hashed code cache
resources should use the cache.

Bug: 358193008, 359335784
Change-Id: I2f7467b8eaa984d0c2863c5bacfa5b32486adfa7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5773687
Commit-Queue: Thomas Lukaszewicz <tluk@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1340840}
2024-08-13 07:58:16 +00:00
Maggie Chen
2fec9a93cf Convert SharedBitmap to SharedImage for Canvas
This CL replaces SharedBitmap with SharedImage in CanvasResourceSharedBitmap.

1. Add new classes WebGraphicsSharedImageInterfaceProvider,
   WebGraphicsSharedImageInterfaceProviderImpl..
2. RendererBlinkPlatformImpl creates GpuChannelHost,
   ClientSharedImageInterface, and then
   WebGraphicsSharedImageInterfaceProvider for SharedGpuContext.
3. In the software rending mode, SharedGpuContext creates and provides
   OffscreenCanvas with WebGraphicsSharedImageInterfaceProvider
   which is later used for creating ClientSharedImage for
   CanvasResourceSharedBitmap.
4. WebGraphicsSharedImageInterfaceProviderImpl observes GpuChannelLost
   and destroys ClientSharedImageInterface in the event of lost.

The feature is behind the flag CanvasSharedBitmapToSharedImage and is
disabled by default.

Bug: 40064122
Change-Id: I081bc0723eb666706046618885809db21ee088f6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5490840
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Commit-Queue: Maggie Chen <magchen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1333200}
2024-07-25 20:51:55 +00:00
Maggie Chen
40a628aad4 Do not call EstablishGpuChannel if the gpu remote has been disconnected
The GPU channel cannot be established when gpu_remote is disconnected.
Stop calling RequestNewLayerTreeFrameSink because it's going to fail
again and it will be stuck in a forever loop of retries. This makes the
processes unable to be killed after Chrome is closed.

Bug: 336164423
Change-Id: Ie7db1df5531e178b2d06063c10c23ded917217b8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5676887
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Commit-Queue: Maggie Chen <magchen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1323390}
2024-07-04 16:19:36 +00:00
Kyra
85c8ce0619 Allow VisitedLinkState to query the partitioned visited link table
This CL enables VisitedLinkState to query for partitioned :visited links when the feature flag is enabled. This requires VisitedLinkState to determine the triple-partition key for each link query, where VisitedLinkReader will match each key with its corresponding per-origin salt before calculating its corresponding fingerprint. If the fingerprint is present in the VisitedLinkReader's hashtable, the link will be styled as visited.

Bug: 345525059
Change-Id: Ib56f93a0f3ea34f62258cf75b2d334dac73334c2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5564325
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Richard (Torne) Coles <torne@chromium.org>
Commit-Queue: Kyra Seevers <kyraseevers@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1315197}
2024-06-14 14:10:34 +00:00
Kyra
de57137aec Obtain and store per-origin salts in the VisitedLinkReader
This CL obtains the per-origin salts sent via navigation commit_params, routes them to the correct VisitedLinkState, and stores them in the correct process' VisitedLinkReader. All per-origin salts for a given process can be found in the VisitedLinkReader's <origin,salt> map. These salts are necessary for hashing and determining if a link is :visited.

Context CL: https://chromium-review.googlesource.com/c/chromium/src/+/5353594
Design Doc: https://docs.google.com/document/d/19qYPkfPNkPnmVcZ6jjl7jR8JPKY6j4rTjfoFRHll2IQ/edit?tab=t.0

Change-Id: I7fd089ea3fdf752644b0bf1b0339ca147620c7ff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5540573
Commit-Queue: Kyra Seevers <kyraseevers@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1309904}
2024-06-04 13:25:26 +00:00
Olga Sharonova
bf7a6d79e8 Revert "Remove resampler from AudioDestination"
This reverts commit ac42aafa79.

Conflicts resolved:

* content/renderer/media/renderer_webaudiodevice_impl.cc
* third_party/blink/renderer/platform/audio/audio_destination.cc

The rest is a clean revert.

Details: see https://docs.google.com/document/d/11fJRBGFQy00zH391ARfeiyIw193ej0yDqt-f-0Y1k1s/r/0-FFZnnH-ca0Bf8JFLomtnCw/edit?tab=t.0

Bug: 331836623
Change-Id: I3312436464447b6312c9cb1f3f6fd12d36c61308
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5424641
Commit-Queue: Michael Wilson <mjwilson@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Hongchan Choi <hongchan@chromium.org>
Reviewed-by: Michael Wilson <mjwilson@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1283434}
2024-04-05 22:33:28 +00:00
Bartek Nowierski
f473c24b5e Obliterate ExperimentalRenderer
crrev.com/c/5298894 rendered it not needed. Remove the definition and all usages.

This CL is a no-op.

Bug: 40064499
Change-Id: Ief3c6f697040cf704a8fca57ed8d4fd593db60c4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5309774
Owners-Override: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1262758}
2024-02-20 17:51:15 +00:00
Olga Sharonova
ac42aafa79 Remove resampler from AudioDestination
This CL removes the resampling function from
AudioDestination and make the WebAudio use the underlying
resampler in the audio infra.

Bug: 1503735
Change-Id: Ie79fa7e177e52e543a23ceb7c8f9010f37c9eba8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5241060
Reviewed-by: Hongchan Choi <hongchan@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Michael Wilson <mjwilson@chromium.org>
Commit-Queue: Olga Sharonova <olka@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1258424}
2024-02-09 10:17:44 +00:00
Arthur Sonzogni
c686e8f4fd Rename {absl => std}::optional in //content/
Automated patch, intended to be effectively a no-op.

Context:
https://groups.google.com/a/chromium.org/g/cxx/c/nBD_1LaanTc/m/ghh-ZZhWAwAJ?utm_medium=email&utm_source=footer

As of https://crrev.com/1204351, absl::optional is now a type alias for
std::optional. We should migrate toward it.

Script:
```
function replace {
  echo "Replacing $1 by $2"
  git grep -l "$1" \
    | cut -f1 -d: \
    | grep \
      -e "^content" \
    | sort \
    | uniq \
    | grep \
      -e "\.h" \
      -e "\.cc" \
      -e "\.mm" \
      -e "\.py" \
    | xargs sed -i "s/$1/$2/g"
}
replace "absl::make_optional" "std::make_optional"
replace "absl::optional" "std::optional"
replace "absl::nullopt" "std::nullopt"
replace "absl::in_place" "std::in_place"
replace "absl::in_place_t" "std::in_place_t"
replace "\"third_party\/abseil-cpp\/absl\/types\/optional.h\"" "<optional>"
git cl format
```

# Skipping unrelated "check_network_annotation" errors.
NOTRY=True

Bug: chromium:1500249
Change-Id: Icfd31a71d8faf63a2e8d5401127e7ee74cc1c413
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5185537
Auto-Submit: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1245739}
2024-01-11 08:36:37 +00:00
Tsuyoshi Horo
2455e70001 Use network::ResourceRequest instead of WebURLRequest in ResourceFetcher
blink::WebURLRequest is used for the argument of
URLLoaderThrottleProvider::CreateThrottles() method after [1]. But we
are planing to call this method from the background thread where we
don't use blink::WebURLRequest [2]. Also we are planing to deprecate
blink::WebURLRequest, and planing to use network::ResourceRequest
instead [3].

So this CL changes the argument type of CreateThrottles() from
blink::WebURLRequest to network::ResourceRequest.
A network::ResourceRequest is created in ResourceLoader::Start(). So we
pass the reference of the structure through ResourceFetcher::
CreateURLLoader().

In frames:
  ResourceLoader::Start()
  -> ResourceFetcher::CreateURLLoader()
    -> LoaderFactoryForFrame::CreateURLLoader()
    |-> URLLoaderThrottleProvider::CreateThrottles()
    |-> ServiceWorkerNetworkProviderForFrame::
    |     GetSubresourceLoaderFactory()
    |-> URLLoaderFactory::CreateURLLoader()

In workers:
  ResourceLoader::Start()
  -> ResourceFetcher::CreateURLLoader()
    -> LoaderFactoryForWorker::CreateURLLoader()
    |-> WebWorkerFetchContext::CreateThrottles()
    | -> WebServiceWorkerFetchContextImpl::CreateThrottles() or
    |    DedicatedOrSharedWorkerFetchContextImpl::CreateThrottles()
    |  -> URLLoaderThrottleProvider::CreateThrottles()
    |-> URLLoaderFactory::CreateURLLoader()

mojom::blink::RequestContextType in blink::WebURLRequest is checked in
the code path. But this type member is not in network::ResourceRequest.
network::ResourceRequest has a network::mojom::RequestDestination
member. And some of these checks of mojom::blink::RequestContextType can
be safely converted to network::mojom::RequestDestination without any
behavior change. But the check in ResourceFetcher::CreateURLLoader()
needs the mojom::blink::RequestContextType. Also we need to pass
`service_worker_race_network_request_token` to
LoaderFactoryForWorker::CreateURLLoader(), and
`is_from_origin_dirty_style_sheet` flag to
ServiceWorkerNetworkProviderForFrame::GetSubresourceLoaderFactory().
So this CL adds these three arguments to CreateURLLoader() methods.

[1]: https://crrev.com/c/994152
[2]: https://crrev.com/c/5113665
[3]: https://groups.google.com/a/chromium.org/forum/#!topic/platform-architecture-dev/ntSzerId4gw

Bug: 1379780
Change-Id: I6e0a987d779b1fb428a4b27b813b3f53f2d1d781
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5121813
Reviewed-by: Erik Chen <erikchen@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Sean Topping <seantopping@chromium.org>
Reviewed-by: Richard (Torne) Coles <torne@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: David Song <wintermelons@google.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Devlin Cronin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1245656}
2024-01-11 01:58:45 +00:00
Dibyajyoti Pal
0ddc941b4c [Code Health Rotation] Spanification of VisitedHashLink
This CL converts the const char* canonical_url and its size into a
std::string_view throughout the stack, from the blink/ layer all the
way up to chrome/ and components/.

This change should be a no-op, since it just changes the way data
is sent through the stack instead of making any logic changes.

More context on Spanification: https://docs.google.com/document/d/1rV6zYT5l5oUeCcF149eTjIG3E4ukecvoUQpiMtB3wk0/edit?resourcekey=0-sHZDaXR51dCRy-3XiTbiGg&tab=t.0

Bug: 1490484
Change-Id: Iaed5ae06bf4bb95202c015af5af14a4f397967ab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5169058
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Nate Fischer <ntfschr@chromium.org>
Commit-Queue: Dibyajyoti Pal <dibyapal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1244847}
2024-01-09 20:36:34 +00:00
Dave Tapuska
3a7845d552 Set background state of isolate on creation
When a main thread isolate is created ask the platform whether it should
start in the background state or not. Extension processes always start
in the background state to conserve memory.

Bug: 263412
Change-Id: Ieb7e2c8854dc0de63f580ea53f61bfa5cda72514
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5078440
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1233413}
2023-12-05 17:20:49 +00:00
Joone Hur
e6f4248690 WebGPU: Establish the GpuChannel asynchronously
Since WebGPU RequestAdapter works asynchronously, we use
EstablishGpuChannel() instead of EstablishGpuChannelSync()
to avoid blocking the main thread.

Bug: 1333560
Change-Id: I88b9aa558fc89bb390546fe034a6c4c8c4f2350a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5041936
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Joone Hur <joone@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1229760}
2023-11-28 06:35:34 +00:00
Dave Tapuska
3b10dd56a9 Remove a sync call to create a frame sink.
The browser always generates FrameSinks in the range of [0, INT_MAX]
Let the renderer generate the rest of the range, this eliminates the
need for a sync IPC.

Bug: 993189
Change-Id: I417a72e82a4be38d83d7d4edfc5f675fe20541e1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4995105
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Jonathan Ross <jonross@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1219029}
2023-11-02 19:19:54 +00:00
Joanne de Abreu
7cbed87a21 Attribution Reporting: Support disabled option for WebView
Change attribution support to be web_contents specific to support the
disabled option for WebView. This change ensures that when attribution
reporting is disabled for WebView, no calls are made (previously the
initial calls to the attribution server were made, although the result
was not logged).

OBSOLETE_HISTOGRAM[Conversions.AttributionSupport]=Replaced by Conversions.AttributionOsLevelApiState and Conversions.AttributionBehavior

Fixed: 1492081
Test: AttributionReportingTest
Change-Id: I0a1aceca88805a8446691aee98e2e5b7716dadb9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4966783
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Joanne de Abreu <jdeabreu@google.com>
Reviewed-by: Nan Lin <linnan@chromium.org>
Auto-Submit: Joanne de Abreu <jdeabreu@google.com>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Elly FJ <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1217264}
2023-10-30 23:25:26 +00:00
Zelin Liu
1d4f507934 iwa: Allow IWA to register non-HTTP scheme Protocol Handler
Protocol Handler specifies that only URLs with HTTP/HTTPS schemes are
allowed to be registered as Protocol handlers. However non-web URLs like
chrome-extension:// and isolated-app:// should be an exception to this.
This CL creates a new ProtocolHandlerSecurityLevel kSameOrigin that
allows the registration of protocol handler URL of non-HTTP(S) scheme
(while still within the same origin as the requesting frame). Currently,
only "isolated-app" schemed URLs are granted this security level.

Bug: 1484037
Change-Id: I94f87b065f45c2d1a6dbeb5484e32c4f52f71761
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4872957
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Zelin Liu <zelin@chromium.org>
Reviewed-by: Gyuyoung Kim <gyuyoung@igalia.com>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Reviewed-by: Robbie McElrath <rmcelrath@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1207201}
2023-10-09 19:17:52 +00:00
Kalvin Lee
bc3754aeb1 MiraclePtr: Rewrite renderer
This change is not intended to change any behavior. This is a
mediumweight rewrite applied primarily to renderer code, promoting a
bunch of `T*` into `raw_ptr<T>` (or `T&` to `raw_ref<T>`).

MiraclePtr is not yet generally enabled in the renderer process,
so this should only affect rewritten members by turning them into
no-op `raw_ptr` (thought to have negligible overhead).

Given the scope of the rewrite and the security benefits, we feel that
the binary size increase is unavoidable.

AX-Relnotes: n/a.
Binary-Size: Size increase is unavoidable (see above).
Bug: 1444624
Change-Id: I1cda6fe446b1a8552cb3c98c1afeae0f15218619
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4904523
Owners-Override: Keishi Hattori <keishi@chromium.org>
Commit-Queue: Kalvin Lee <kdlee@chromium.org>
Reviewed-by: Keishi Hattori <keishi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1203810}
2023-10-01 22:37:34 +00:00
Rahul Yadav
35bdb2d7eb Convert AudioLatency::LatencyType enum to enum class
Bug: 1101837
Change-Id: If43c599139f43d05e0b641019f25fd44e9df5eb2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4745500
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Olga Sharonova <olka@chromium.org>
Reviewed-by: Xiaohan Wang <xhwang@chromium.org>
Commit-Queue: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1181341}
2023-08-09 07:09:46 +00:00
Victor Tan
8766147948 Remove UA reduction OT features for all requests
This CL removes support User-Agent reduction origin trial for Javascript
API and all subresource requests. Make sure all context use the default
user-agent function instead of checking whether response has a valid
origin trial token on User-Agent reduction/deprecation origin trial.

This CL also refactor corresponding tests to make sure the user-agent
returns the correct value when reduction features turns on.

This CL cleans up other one-off code we introduced to completed the
user-agent reduction origin trial.

Change-Id: I3f1c3213feffc8f3fc7de8dc5c23b9090f498e3a
Bug: 1258063
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4557684
Reviewed-by: Ari Chivukula <arichiv@chromium.org>
Commit-Queue: Victor Tan <victortan@chromium.org>
Reviewed-by: Clark DuVall <cduvall@chromium.org>
Reviewed-by: Yoav Weiss <yoavweiss@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1155100}
2023-06-08 21:38:41 +00:00
sisidovski
a9978ebaef Remove unnecessary param in CreateServiceWorkerSubresourceLoaderFactory
This is a refactoring CL that removes
`blink::mojom::ServiceWorkerFetchHandlerBypassOption
fetch_handler_bypass_option` from
CreateServiceWorkerSubresourceLoaderFactory. The param was introduced in
the previous CL [1], but it was unnecessary plumbing, we can pass
`mojom::blink::ServiceWorkerFetchHandlerBypassOption::kDefault` directly
to ControllerServiceWorkerConnector in
RendererBlinkPlatformImpl::CreateServiceWorkerSubresourceLoaderFactory.

[1] crrev.com/c/4451966

Bug: 1420517
Change-Id: Ifd4d3867b2b0c7f0e00d27b342255287b0a1c017
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4573500
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Shunya Shishido <sisidovski@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152364}
2023-06-02 05:29:33 +00:00
Daniel Cheng
ea8701b96a Migrate HTMLCanvasElement from TopDocument() to GetDocument().
The URL is just used for annotation purposes; there's no need to use
TopDocument() here, which is misleading in cross-process iframes, since
it returns the Document of the local root instead. Several other places
already pass the document URL instead of the "top" document URL, so this
brings <canvas> more in line with the other uses anyway.

Also rename the various parameters and places it's plumbed through to
remove "top" from the name.

Bug: 617677
Change-Id: I6e605f1fd16001a6cfdeda83cd80e514d1cbdc45
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4545273
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1146207}
2023-05-18 21:53:49 +00:00
Philipp Hancke
e1f3a37a0b flags: remove enable-webrtc-srtp-aes-gcm
which has been enabled by default for a year.

BUG=chromium:1129148,chromium:713701

Change-Id: I24423f68ef01fa2610e4c95751b7a7b73cd04516
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2693566
Reviewed-by: Florent Castelli <orphis@chromium.org>
Commit-Queue: Florent Castelli <orphis@chromium.org>
Reviewed-by: Harald Alvestrand <hta@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1145033}
2023-05-17 00:54:41 +00:00
Takashi Sakamoto
81190c81ea Add switch::kUserLevelMemoryPressureSignalParams to command line for UserLevelMemoryPressureSignalGenerator feature.
Replace IsFeatureEnabledWithoutActivation() with the command line flag,
and before launching renderer processes, add the command line flag to
provide the feature's parameters for the renderer process if
UserLevelMemoryPressureSignalGenerator is enabled.

Bug: 1393283
Change-Id: I1a08c7356619e1793b18d967535283148c53b60d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4455591
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Bartek Nowierski <bartekn@chromium.org>
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Commit-Queue: Takashi Sakamoto <tasak@google.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1135647}
2023-04-26 00:29:03 +00:00
Nan Lin
bb2dbd9738 Allow web attribution to be independently configurable in OS-Support
https://github.com/WICG/attribution-reporting-api/pull/758

Web attribution is explicitly disabled for WebView. This CL extends
the OS support enum to allow web attribution to be independently
configurable, and the Attribution-Reporting-Support header will
indicate the support level accordingly.

If neither web nor os-level attribution is enabled, background
attributionsrc requests will not be made, and
the Attribuiton-Reporting-Eligible header will not be set on requests.
Note that this applies even when kAttributionReportingCrossAppWeb
feature is disabled to avoid bandwidth waste.

A virtual function is added to ContentBrowserClient to allow WebView
to disable web attribution. A follow-up CL will enable OS support and
disable web support on WebView.

Note that we cannot add web tests for the NoWebOrOsSupport DevTools
issue type as there is no way to override the OS support value there.

Side note: when both web and OS are supported, the header is updated
to "os, web" to align with the explainer.

Bug: 1432278
Change-Id: Id53852ed2891755ff05b74ea025ce40f44c08956
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4413547
Reviewed-by: Andrew Paseltiner <apaseltiner@chromium.org>
Commit-Queue: Nan Lin <linnan@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Garrett Tanzer <gtanzer@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Nate Chapin <japhet@chromium.org>
Reviewed-by: Charlie Harrison <csharrison@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1134960}
2023-04-25 01:05:18 +00:00
sisidovski
f13aca04b6 [BestEffortServiceWorker] Use OriginTrial token to enable the feature
This CL enables ServiceWorkerBypassFetchHandler with the
`all_with_race_network_request` option (aka BestEffortServiceWorker) via
OriginTrial token.

We add the new option named
`ServiceWorkerFetchHandlerBypassOption::kRaceNetworkRequest` to
ServiceWorkerFetchHandlerBypassOption mojom, so that we can pass the
info that the loader should trigger RaceNetworkRequest from browser
to renderer. Once ServiceWorkerMainResourceLoader confirmed there is a
valid OriginTrial token, set
`ServiceWorkerFetchHandlerBypassOption::kRaceNetworkRequest`. Then
ServiceWorkerSubresourceLoader which is on a renderer side lookup
fetch_handler_bypass_option and dispatch RaceNetworkRequest.

Change-Id: I6d22bbcaee96e80d0e93b4f665e3d326d0c1ac71
Bug: 1420517
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4451966
Commit-Queue: Shunya Shishido <sisidovski@chromium.org>
Reviewed-by: Sam McNally <sammc@chromium.org>
Reviewed-by: Minoru Chikamune <chikamune@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1133597}
2023-04-21 04:14:23 +00:00
Nan Lin
6a63aa64a5 Move Attribution-Reporting-Support header setting to network service
This is one of the first steps to move attribution reporting request
and response logic to network service. It also makes it easier to
enforce the properties that the header is set if and only if the
corresponding feature is enabled and when the
Attribution-Reporting-Eligible is also present.

The feature flag and the mojom type are moved to
//services/network/public to be used by //services/network, blink and
browser. We will investigate removing all knowledge of the OS support
value from the renderer in the future.

The OS support enum is added to the resource request types to be
populated to the network service layer.

We will likewise move setting the Attribution-Reporting-Eligible header
to the network service in a future CL.

Bug: 1375791, 1425083
Change-Id: I6d0dc6154230963b376477a74239115b64c6ffae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4426530
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Andrew Paseltiner <apaseltiner@chromium.org>
Reviewed-by: Nate Chapin <japhet@chromium.org>
Reviewed-by: Garrett Tanzer <gtanzer@chromium.org>
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: David Bokan <bokan@chromium.org>
Reviewed-by: Brendon Tiszka <tiszka@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Commit-Queue: Nan Lin <linnan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1131961}
2023-04-18 16:25:13 +00:00
Ben Wagner
c6b58b2efb Remove font_loader_ fields
These fields are never used after they are set. While they extend the
lifetime of the font loader there is no reason for them to do so.

Change-Id: I6382f3f2ae66b8aecce882f1ee2c11b26935ac24
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4424010
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Ben Wagner <bungeman@chromium.org>
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1130855}
2023-04-15 15:53:01 +00:00
Takashi Sakamoto
02be616c8f Make UserLevelMemoryPressureSignal not to dispatch any signals for inert intervals after loading is finished.
Add |inert_interval| finch parameter to the feature and modify the code
to see RAILMode changes on render processes. If the current RAIL mode is
loading or is just changed to be not loading, we will consider that the
render process is running OnLoad or DOMContentLoaded event handler. The
process requires memory to finish the event handlers. So wait inert
interval after loading is finished and dispatch memory pressure signals
if any requests are arrived during the inert interval.

Bug: 1393283
Change-Id: Id12458659437b9ba74b038f9c1847c7799982672
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4333318
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Takashi Sakamoto <tasak@google.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1120355}
2023-03-22 03:20:42 +00:00
Tsuyoshi Horo
e4698c759a [Extensions] Use blink::URLLoaderThrottle for CSS localization
Currently ExtensionLocalizationPeer is used to replace localization
templates in CSS files with the appropriate localized strings for
extensions [1].

ExtensionLocalizationPeer was introduced 13 years ago [2], and it is
using a mechanism of blink::WebRequestPeer to intercept and replace the
content body.

This mechanism of blink::WebRequestPeer is used only by
ExtensionLocalizationPeer now. And we can replace the content body using
the more widely used mechanism of blink::URLLoaderThrottle.

This CL introduces a new blink::URLLoaderThrottle named
ExtensionLocalizationThrottle, and replaces ExtensionLocalizationPeer
with it. This CL also removes the WebResourceRequestSenderDelegate which
is used only for ExtensionLocalizationPeer.

[1] https://developer.chrome.com/docs/extensions/reference/i18n/
[2] https://codereview.chromium.org/570007

Bug: 1417066, 1413912
Change-Id: I19b97bd745875f24f943d7cd9f93171de8ef627d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4257812
Reviewed-by: Tommy Nyquist <nyquist@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: David Bertoni <dbertoni@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1109362}
2023-02-24 00:49:46 +00:00
Tsuyoshi Horo
3084165ea6 Stop creating WebURLLoaderFactory in content/
This CL does the following:
 1. Delete Platform::WrapURLLoaderFactory() method.

 2. Make RenderThreadImpl::InitializeRenderer() call a new
    blink::SetCorsExemptHeaderList() method which calls
    blink::LoaderFactoryForFrame::SetCorsExemptHeaderList().

 3. blink::LoaderFactoryForFrame::CreateURLLoader() and
    PrefetchedSignedExchangeManager will create a WebURLLoaderFactory
    using a new blink::LoaderFactoryForFrame::GetCorsExemptHeaderList()
    method.

Bug: 1413912
Change-Id: I6a37e355ee5779878ad3b086b079a04e6f9ab64b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4236209
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1104452}
2023-02-13 13:17:28 +00:00
Tsuyoshi Horo
7d8d2cca51 Stop creating WebURLLoader in ServiceWorkerNetworkProviderForFrame
Currently ServiceWorkerNetworkProviderForFrame::CreateURLLoader() in the
content layer is called to create a WebURLLoader from
blink::LoaderFactoryForFrame::CreateURLLoader().

We'd like to stop exposing blink::WebURLLoader to the content layer.

So this CL does the followings:
 - Replace ServiceWorkerNetworkProviderForFrame::CreateURLLoader() with
   GetSubresourceLoaderFactory() which returns a
   network::SharedURLLoaderFactory.
 - Make blink::LoaderFactoryForFrame::CreateURLLoader() call the new
   method to get a network::SharedURLLoaderFactory, and create a
   blink::WebURLLoaderFactory using Platform::WrapURLLoaderFactory().
 - Introduce Platform::WrapURLLoaderFactory(
   scoped_refptr<network::SharedURLLoaderFactory>).

This CL should not introduce any behavior change.

Bug: 1413912, 789857

Change-Id: I44343eaceda6d308924db5bc75de8385ec01c4c9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4211117
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1102996}
2023-02-08 23:24:53 +00:00
Takashi Sakamoto
9f5e41017d Make each render process provide its private memory footprint for browser process.
Because of the "hidepid=2" mount option for /proc on Android,
browser process cannot open /proc/{render process pid}/maps and
status, i.e. no such file or directory.
So add PrivateMemoryFootprintProvider, which uses MemoryUsageMonitor,
to third_party/blink/renderer/controller and provides the calculated
private memory footprint for browser process by using render_host.mojom.

Bug: 1393283

Change-Id: Ibb00262afc2ed0552e3f0c2ec5fb7449878b93c9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4124620
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Takashi Sakamoto <tasak@google.com>
Cr-Commit-Position: refs/heads/main@{#1096563}
2023-01-25 01:54:28 +00:00
David Bienvenu
3682d7432e win7dep: remove Win7/8 code from content and third_party/blink
Win7/8 support is deprecated. This CL removes the remaining Win7/8
code from content/* and a bit of corresponding code from
third_party/blink.

Also fixes lint warnings.

Bug: 1385856
Change-Id: I214fe93fc1583a2214862e9652ffef7d81043691
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4178560
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: David Bienvenu <davidbienvenu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1095092}
2023-01-20 18:33:57 +00:00
Michael Wilson
0d73f7f1c0 Use media::AudioRendererSink::RenderCallback for WebAudio
Replace WebAudioDevice::RenderCallback with the above, to reduce
overhead from adapting between different callback types.

This will also make it easier for WebAudio to support the new audio
glitch reporting system (to be done in a follow-up CL, see bug link
below).

Higher-level, I think we should move toward unifying more of
Chromium's audio infrastructure and this is a step in that direction.

Bug:1384499

Change-Id: I1a7640335b0a7f1d2bb58d6ca719a84a6358faac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4126170
Reviewed-by: Hongchan Choi <hongchan@chromium.org>
Reviewed-by: Alvin Ji <alvinji@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Michael Wilson <mjwilson@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1090673}
2023-01-10 03:17:05 +00:00
Nan Lin
153a5459e6 Share getting support header between renderer and browser
Moved AttributionOsSupport enum to
components/attribution_reporting as well.

Bug: 1373536
Change-Id: Ibc317bde464facb247adda2bc76f9ddea51a8046
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4097645
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Nan Lin <linnan@chromium.org>
Reviewed-by: Andrew Paseltiner <apaseltiner@chromium.org>
Reviewed-by: Nate Chapin <japhet@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1083237}
2022-12-14 19:07:31 +00:00
Markus Handell
c9ac9082c8 Make VideoFrameCompositorTaskRunner accessible from Platform.
The VideoFrameCompositorTaskRunner is currently not accessible
from modules and platform/peerconnection. This CL makes it available
using accessors in Platform instead and is a prerequisite to make
VSyncDecoding work in a subsequent CL.

Bug: 1393053
Change-Id: Ic7d4ce3b197dc738f496ada896f6e228421a50ef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4051150
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Markus Handell <handellm@google.com>
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1079474}
2022-12-05 22:49:52 +00:00
Nan Lin
1690b2c604 Route attribution measurement state to renderer
This CL adds an interface to `AttributionManager` to get measurement
state and route the state to renderer.

Also updated call sites to populate Attribution-Reporting-Support
header accordingly.

Bug: 1373536
Change-Id: I0347a77c24d96c592d617f3d0cbe6834c0a5ab73
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3967036
Reviewed-by: John Delaney <johnidel@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Nate Chapin <japhet@chromium.org>
Reviewed-by: Andrew Paseltiner <apaseltiner@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Nan Lin <linnan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1067794}
2022-11-05 00:42:21 +00:00
Markus Handell
2878995f1f Stop assuming the Media task runner is a thread.
Code generally assumes the Media task runner is a single thread. Issue
crbug.com/1144329 hints at there isn't a hard requirement that the Media
sequence is a thread, and additional motivation for changing has been
provided in crbug.com/1144329#c2 (power consumption).

This change should be NOP, but hoists build assumptions on Media being a
SingleThreadTaskRunner to being its super class, SequencedTaskRunner.

Future CLs will be landed to also fix runtime dependencies as the Media
thread switches to become sourced by CreateSequencedTaskRunner() inside
RenderThreadImpl.

Bug: 1144329
Change-Id: Id24ffd3c059a9e5da567861758500c171031fd36
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3928266
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Dan Sanders <sandersd@chromium.org>
Reviewed-by: Jordan Bayles <jophba@chromium.org>
Reviewed-by: Sean Topping <seantopping@chromium.org>
Commit-Queue: Markus Handell <handellm@google.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1059135}
2022-10-14 07:32:09 +00:00
Hongchan Choi
7955b52596 Introduce WebAudioSinkDescriptor for output device selection
This CL adds a new data container for output device selection of
Web Audio API. The container includes two attributes: the sink type
and the sink device identifier.

This is to implement the spec change for output device selection:
https://webaudio.github.io/web-audio-api/#AudioSinkOptions
https://webaudio.github.io/web-audio-api/#AudioSinkInfo

LOW_COVERAGE_REASON=Changes in renderer_blink_platform_impl.cc are
mostly refactoring and data plumbing. There are no logic/behavior
changes in the file.

Bug: 1216187
Change-Id: Iec2493181dcb236ec26b35dbe4242ba0a4066b2c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3950491
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Hongchan Choi <hongchan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1058500}
2022-10-13 03:59:34 +00:00
Maksim Sisov
4c1ee8e418 Make a wrapper for worker raster context provider
This shared wrapper context will be responsible for creating and
sharing gpu image decode caches (depends on availability of the
gpu rasterization) between CC instances. This will help to reduce
GPU memory usage.

Bug: 1279568
Change-Id: I554f92a175635a57b41ba51d2b322fb14ca56ed2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3834492
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Maksim Sisov <msisov@igalia.com>
Reviewed-by: Khushal Sagar <khushalsagar@chromium.org>
Reviewed-by: Bo Liu <boliu@chromium.org>
Reviewed-by: Tomas Gunnarsson <tommi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1054715}
2022-10-04 15:13:28 +00:00
Avi Drissman
4e1b7bc33d Update copyright headers in content/
The methodology used to generate this CL is documented in
https://crbug.com/1098010#c34.

No-Try: true
No-Presubmit: true
Bug: 1098010
Change-Id: I8c0f009d16350271f07d8e5e561085822cc9dd27
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3895935
Owners-Override: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1047456}
2022-09-15 14:03:50 +00:00
Hongchan Choi
f80fc63e17 Clean up CreateAudioDevice() in Blink Platform API
This CL cleans up two redundant arguments in
CreateAudioDevice() function: input channel count and input device
specifier. These argument was added in the past for some reasons,
but it is not being used anywhere today.

NOTE: This does not include a functional change.

Change-Id: Ife7c530a7f5d1ad6d4f55bee9207474cfd6ed133
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3817846
Commit-Queue: Hongchan Choi <hongchan@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1032806}
2022-08-09 00:36:32 +00:00
Joseph Koshy
9b29e82ac8 content: Remove the TopLevelBlameContext class.
This change list is part of an effort to remove
TRACE_EVENT_PHASE_(ENTER|LEAVE)_CONTEXT trace
events and associated instrumentation.

BUG=1349313

Change-Id: Icd44300b62fde87bd08d6d2466d684a64f069c42
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3805320
Commit-Queue: Joseph Koshy <jkoshy@chromium.org>
Auto-Submit: Joseph Koshy <jkoshy@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Commit-Queue: Alexander Timin <altimin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1030566}
2022-08-02 15:30:02 +00:00
Dave Tapuska
fcd9bb78af Move CategorizedWorkerPool into blink.
When LayerTreeView was moved into blink the raster threads were still
left in content/renderer. Move this implementation into blink.

BUG=1097816

Change-Id: I5205087d7cb0ea048d4a8f035cb4cad13b82ed34
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3748569
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Owners-Override: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1023307}
2022-07-12 18:09:31 +00:00
Dave Tapuska
38e9de072a Remove Database/Filesystem origin identifier platform APIs.
renderer/core depends on storage/common so modules should be able to.
Remove the APIs from the platform that cause the serialization of the
SecurityOrigin to a String and parse into a GURL. Use the ToUrlOrigin
directly to avoid the serialization as null.

BUG=591482

Change-Id: I49c1ba7a6ae9216746dc16dbb6ea3b6f162cec9e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3749483
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1023283}
2022-07-12 17:29:01 +00:00
Dave Tapuska
91df26bd6d Remove wrapping SharedURLLoaderFactory and WebPublicSuffixList.
The last callee of this method was removed in crrev.com/23278a9c.

BUG=538751

Change-Id: I9687e3553c9e65dd5d66b586fb2bd8da5fceb2a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3749487
Reviewed-by: Stefan Zager <szager@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1023243}
2022-07-12 16:02:34 +00:00
Zhibo Wang
d9e4a00a85 Create base::ThreadType to replace base::ThreadPriority
This is a no-op migration from base::ThreadPriority to base::ThreadType.
Except for the name changes of enum classes and functions, their
behavior should be kept unchanged. By using the new ThreadType API, the
caller declare the type of work a thread runs, and let the platform
implementation decide its behavior. Apart from the current priority
setting, the QoS API will further be used on some platforms.

Mappings in existing callers are as follows:
  ThreadPriority::BACKGROUND => ThreadType::kBackground
  ThreadPriority::NORMAL => ThreadType::kDefault
  ThreadPriority::DISPLAY for compositing only on select
                          platforms (WIN, ANDROID, CrOS)
                   => ThreadType::kCompositing
  ThreadPriority::DISPLAY unconditionally on *all* platforms
                   => ThreadType::kDisplayCritical
  ThreadPriority::REALTIME_AUDIO => ThreadType::kRealtimeAudio

As this CL aims to make all platform-specific decisions in the
platform_thread_<platform>.cc impls, ifdef exceptions on main threads
(like on Mac) have moved to their respective impls.

The resulting callers should thus have no ifdefs left except for the odd
exception with a TODO we aim to unravel after this no-op CL.

ifdefs for render_message_filter()->SetThreadType() stay for now as this
call is already platform specific.

Bug: 1278628, 1324809
Change-Id: I36fbc4fc988c12e712da2e131595255a7b4fe4b7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3329026
Reviewed-by: Wez <wez@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Commit-Queue: Zhibo Wang <zhibo1.wang@intel.com>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Olga Sharonova <olka@chromium.org>
Reviewed-by: Bo Liu <boliu@chromium.org>
Reviewed-by: Peng Huang <penghuang@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Markus Handell <handellm@google.com>
Reviewed-by: Sergey Volk <servolk@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Etienne Pierre-Doray <etiennep@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1021517}
2022-07-07 04:34:59 +00:00
Hiroki Nakagawa
777a6a936a ServiceWorker: Remove experimental FetchEvent worker timing
FetchEvent worker timing is the experimental feature behind the runtime
flag. The implementation of the feature has been suspended since 2019
November, and we don't have a plan to complete it. For code simplicity,
this CL removes the entire implementation.

This removal should be safe as the feature has never been shipped on any
browsers and its spec is still in the editor's explainer stage[1] (not
merged into the service worker spec and the resource timing spec).

[1] https://github.com/wanderview/fetchevent-worker-timing/blob/master/explainer.md

Bug: 900700
Change-Id: I781ccece189e80bfb329073ed952dc1bffd1d1b7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3697967
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Ben Kelly <wanderview@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1013407}
2022-06-13 11:09:28 +00:00