0
Commit Graph

1691 Commits

Author SHA1 Message Date
Sunny Sachanandani
e3e58250e1 Propagate renderer client id in single process mode
Renderer client id is propagated via command line flags, so in single
process mode RenderThreadImpl gets initialized with the default client
id of 1, whereas the browser allocates a globally unique client id for
each renderer.

Viz frame sinks are embedded in a hierarchy which identifies embedders
by their client ids.  So requests made by the renderer to embed other
surfaces are rejected by EmbeddedFrameSinkProviderImpl because the
client ids don't match.

This CL fixes that by propagating the client id from the browser to
RenderThreadImpl in single process mode, and includes related minor code
cleanup.

Bug: 1015988
Change-Id: I758f19df05ad6dc083e01e8cfc760f76ca1831a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1869376
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Cr-Commit-Position: refs/heads/master@{#708319}
2019-10-22 20:10:38 +00:00
Alison Maher
02ff42efe9 Optimize invalidation for high contrast/dark mode
Only invalidate for  high contrast and dark mode if the system colors
changed, if the preferred color scheme changed, if the state of high
contrast changed, or if the state of dark mode changed.

Bug: 970285
Change-Id: I6da9787b84ba3790a94df5b961c6e1ec2a762270
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1869758
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Reviewed-by: Kevin Babbitt <kbabbitt@microsoft.com>
Commit-Queue: Alison Maher <almaher@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#707897}
2019-10-21 18:51:59 +00:00
Antonio Gomes
bc917af886 Migrate PeerConnectionTracker and PeerConnectionTrackerHost to Mojo
This is a preliminary step to Onion souping content::PeerConnectionTracker.

The CL migrates both content::PeerConnectionTracker (renderer) and
content::PeerConnectionTrackerHost (browser) classes away from old
IPC mechanism, to use Mojo.

Additionally, the CL removes from:

- PeerConnectionTracker
  * the inheritance from content::RenderThreadObserver, as well as the respective
  overridden methods, namely OnControlMessageReceived().

- PeerConnectionTrackerHost
  * the inheritance from content::BrowserMessageFilter and
    content::BrowserAssociatedInterface, as well as the respective overridden,
    namely OnMessageReceived(), OverrideThreadForMessage(), OnChannelConnected(),
    OnChannelClosing().

It is important to note that PeerConnectionTrackerHost now operates solely
on the UI thread, so the CL removes some threading jumps between UI and IO
threads.

Last, content/common/media/peer_connection_tracker_messages.h (which declares
the macro-based IPC messages) is now gone.

BUG=787254
TBR=jam@chromium.org

Change-Id: I3ce5af1853384146d893da2a34c333aad80f5255
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1831197
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#707672}
2019-10-20 08:01:54 +00:00
Alison Maher
28a73e2225 Clean up the preferred color scheme pipeline
PreferredColorScheme is currently being sent to the render process
over two pipelines. This change cleans up the repeated code to use the
new pipeline introduced in the following CL:
https://chromium-review.googlesource.com/c/chromium/src/+/1728056

Similar to how system colors are accessed in
https://chromium-review.googlesource.com/c/chromium/src/+/1793742,
PreferredColorScheme has been removed from WebPreferences/WebSettings
and can now accessed through WebThemeEngine.

This change is similar to the clean up change for ForcedColors:
https://chromium-review.googlesource.com/c/chromium/src/+/1802392

Bug: 970285
Change-Id: Id3971e1efb8e9463f51a91c6c0c3469ae9e6d53a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1845575
Commit-Queue: Alison Maher <almaher@microsoft.com>
Reviewed-by: Changwan Ryu <changwan@chromium.org>
Reviewed-by: Kevin Babbitt <kbabbitt@microsoft.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#707478}
2019-10-18 19:26:35 +00:00
Antonio Gomes
579f9f5a87 Lazy initialize PeerConnectionTracker
This CL changes the ownership of PeerConnectionTracker, as a preparation
to Onion souping it.

Reason: when in Blink, there is not a class corresponding to RenderThreadImpl.

BUG=787254
R=guidou@chromium.org, haraken@chromium.org

Change-Id: Ieff1e622d0226547632a1616c3e6c088961d91fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1845802
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Cr-Commit-Position: refs/heads/master@{#707339}
2019-10-18 12:46:42 +00:00
John Budorick
ee1c951278 Reland "Resubmit: Lower priority of processes hosting exclusively ads."
This reverts commit f4bc92d6c5.

Reason for revert: did not resolve flakes.

Original change's description:
> Revert "Resubmit: Lower priority of processes hosting exclusively ads."
> 
> This reverts commit 4ba7eb3aa4.
> 
> Reason for revert: spec revert for
>   crbug.com/1014952
>   crbug.com/1015014
>   crbug.com/1015013
>   crbug.com/1014951
> 
> Original change's description:
> > Resubmit: Lower priority of processes hosting exclusively ads.
> >
> > This change adds a variable to ChildProcessPriorityLauncher to
> > indicate whether the associated process is only used to run tasks for
> > ad frames (low priority frames).  That variable is then used by the
> > RenderProcessHost to background the frame in those cases.  Notification
> > happens in the RenderProcessHost via new UpdateFrameWithPriority.
> >
> > Note: Identification of ad frames is done as per the AdTagging project.
> > Frames that have been marked as ads remain ads, and thus the
> > RenderProcessHost will remain low priority if the frame is navigated
> > to any other non-ad URL within the same process (same domain).
> >
> > Currently this is behind a feature which is off by default.
> > We will be experimenting with this to determine its impact on
> > both ads and in the browser as a whole.
> >
> > TBR=dcheng@chromium.org,gab@chromium.org,pbos@chromium.org,jkarlin@chromium.org
> >
> > Bug: 979234
> > Change-Id: I1acd1b8de7e66f8b2c47564df5e708f9b41f72a6
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1855680
> > Commit-Queue: Eric Robinson <ericrobinson@chromium.org>
> > Reviewed-by: Alexander Timin <altimin@chromium.org>
> > Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#706049}
> 
> TBR=alexmos@chromium.org,altimin@chromium.org,ericrobinson@chromium.org
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Bug: 979234,1014951,1014952,1015013,1015014
> Change-Id: Ib719e3f70371b7941d0b27f9bc171594149dd24e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1864618
> Commit-Queue: John Budorick <jbudorick@chromium.org>
> Reviewed-by: John Budorick <jbudorick@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#706625}

TBR=alexmos@chromium.org,altimin@chromium.org,jbudorick@chromium.org,ericrobinson@chromium.org

Bug: 979234, 1014951, 1014952, 1015013, 1015014
Change-Id: I6625c321b9f7a384ed3407b862d3c04b45dfb735
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1865562
Reviewed-by: John Budorick <jbudorick@chromium.org>
Commit-Queue: John Budorick <jbudorick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#706928}
2019-10-17 15:32:19 +00:00
John Budorick
f4bc92d6c5 Revert "Resubmit: Lower priority of processes hosting exclusively ads."
This reverts commit 4ba7eb3aa4.

Reason for revert: spec revert for
  crbug.com/1014952
  crbug.com/1015014
  crbug.com/1015013
  crbug.com/1014951

Original change's description:
> Resubmit: Lower priority of processes hosting exclusively ads.
>
> This change adds a variable to ChildProcessPriorityLauncher to
> indicate whether the associated process is only used to run tasks for
> ad frames (low priority frames).  That variable is then used by the
> RenderProcessHost to background the frame in those cases.  Notification
> happens in the RenderProcessHost via new UpdateFrameWithPriority.
>
> Note: Identification of ad frames is done as per the AdTagging project.
> Frames that have been marked as ads remain ads, and thus the
> RenderProcessHost will remain low priority if the frame is navigated
> to any other non-ad URL within the same process (same domain).
>
> Currently this is behind a feature which is off by default.
> We will be experimenting with this to determine its impact on
> both ads and in the browser as a whole.
>
> TBR=dcheng@chromium.org,gab@chromium.org,pbos@chromium.org,jkarlin@chromium.org
>
> Bug: 979234
> Change-Id: I1acd1b8de7e66f8b2c47564df5e708f9b41f72a6
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1855680
> Commit-Queue: Eric Robinson <ericrobinson@chromium.org>
> Reviewed-by: Alexander Timin <altimin@chromium.org>
> Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#706049}

TBR=alexmos@chromium.org,altimin@chromium.org,ericrobinson@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 979234,1014951,1014952,1015013,1015014
Change-Id: Ib719e3f70371b7941d0b27f9bc171594149dd24e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1864618
Commit-Queue: John Budorick <jbudorick@chromium.org>
Reviewed-by: John Budorick <jbudorick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#706625}
2019-10-16 21:16:42 +00:00
Eric Robinson
4ba7eb3aa4 Resubmit: Lower priority of processes hosting exclusively ads.
This change adds a variable to ChildProcessPriorityLauncher to
indicate whether the associated process is only used to run tasks for
ad frames (low priority frames).  That variable is then used by the
RenderProcessHost to background the frame in those cases.  Notification
happens in the RenderProcessHost via new UpdateFrameWithPriority.

Note: Identification of ad frames is done as per the AdTagging project.
Frames that have been marked as ads remain ads, and thus the
RenderProcessHost will remain low priority if the frame is navigated
to any other non-ad URL within the same process (same domain).

Currently this is behind a feature which is off by default.
We will be experimenting with this to determine its impact on
both ads and in the browser as a whole.

TBR=dcheng@chromium.org,gab@chromium.org,pbos@chromium.org,jkarlin@chromium.org

Bug: 979234
Change-Id: I1acd1b8de7e66f8b2c47564df5e708f9b41f72a6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1855680
Commit-Queue: Eric Robinson <ericrobinson@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#706049}
2019-10-15 19:25:16 +00:00
Erik Chen
450ab56cfa Don't return undead RenderWidgets from RenderWidget::FromRoutingID.
This CL is a refactor with no behavior change.

In the future, undead RenderWidgets won't exist. By returning nullptr, we
prevent accidentally uses from cropping up.

Bug: 419087
Change-Id: Ie71c7c818921f1d0a464003e69d6cf267f8fe3fe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1850575
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Auto-Submit: Erik Chen <erikchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#704741}
2019-10-10 18:58:13 +00:00
Irina Yatsenko
2f703132c3 Allow v8 to indicate that a full heap dump might be needed on crash.
depends on https://chromium-review.googlesource.com/c/v8/v8/+/1838927

Bug: chromium:1010312
Change-Id: I400537daf428e46180f15444d92a3dedab6aca3b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1838265
Reviewed-by: Stefan Zager <szager@chromium.org>
Commit-Queue: Irina Yatsenko <irinayat@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#703992}
2019-10-09 00:38:48 +00:00
Antonio Gomes
7202754b9f Revert "Revert PeerConnectionDependencyFactory Onion Soup CLs"
This reverts commit 62fa86d36f.

Reason for revert: This is a reland of https://crrev.com/c/1813306
now that the test failures on dbg component builds were fixed.

Original change's description:
> Revert PeerConnectionDependencyFactory Onion Soup CLs
>
> This CL reverts several Onion Soup CLs related to PeerConnectionDependencyFactory.
> The first one in the chain is the culprit for causing failures in some bots,
> but in order to revert it, it is necessary to revert several follow-up CLs.
>
>
> Revert "Onion soup PeerConnectionDependencyFactory and its direct dependencies"
>
> This reverts commit 7e1e15c375.
>
> Revert "Move filtering_network_manager.h and network_manager_uma.h out of the Blink API"
>
> This reverts commit 8f18d55dd8.
>
> Revert "Move stun_field_trial.h out of the Blink API"
>
> This reverts commit e8cd34ee34.
>
> Revert "Move {ipc,empty}_network_manager.h and out of Blink API"
>
> This reverts commit 2dc64b396a.
>
> Revert "Move socket_client.h out of the Blink API"
>
> This reverts commit b2223b283a.
>
> Revert "Remove rtc_video_{encoder,decoder}_factory_util.h from Blink API"
>
> This reverts commit a438dfe161.
>
> Revert "Move video_codec_factory.h out of the Blink API"
>
> This reverts commit 2fa285a7c6.
>
> Revert "Change blink::PeerConnectionDependencyFactory ownership"
>
> This reverts commit a1ac2f02cd.
>
> Revert "Replace uses of blink::Platform::GetWebRtcAudioDevice"
>
> This reverts commit c19364a15a.
>
> Revert "Remove left-over //content/renderer/p2p/"
>
> This reverts commit f4bbeac1f9.
>
>
> Bug: 1005604
> TBR: treib@chromium.org
>
> Change-Id: I6d287dc1d141721496d5e058639f268b73b1ab09
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1813306
> Commit-Queue: Guido Urdaneta <guidou@chromium.org>
> Auto-Submit: Guido Urdaneta <guidou@chromium.org>
> Reviewed-by: Guido Urdaneta <guidou@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#698024}

TBR=guidou@chromium.org

Change-Id: I191ee9c271047f5c02971b8f7c4ea3d6d0460dbd

Bug: 1005604
Change-Id: I191ee9c271047f5c02971b8f7c4ea3d6d0460dbd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1814600
Reviewed-by: Antonio Gomes <tonikitoo@igalia.com>
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Kentaro Hara <haraken@chromium.org>
Auto-Submit: Antonio Gomes <tonikitoo@igalia.com>
Cr-Commit-Position: refs/heads/master@{#703731}
2019-10-08 15:30:10 +00:00
Irina Yatsenko
90f4ba6ecc Add default case in AddCrashKey
This allows to avoid build breaks when new ids are added on v8's side.

Bug: chromium:1010312
Change-Id: Ia375cc842137e4b58f801e0fcc63d2222b0cf482
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1841933
Reviewed-by: Stefan Zager <szager@chromium.org>
Commit-Queue: Irina Yatsenko <irinayat@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#703494}
2019-10-07 22:13:29 +00:00
danakj
f24dc81cb2 Reland "Don't PostTask the RenderWidget::Close() call."
This is a reland of 8f0dc9682b

Original change's description:
> Don't PostTask the RenderWidget::Close() call.
>
> The post task in RenderWidget was in order to keep IPC receipt of
> destruction of a frame-based RenderWidget (ie a RenderView in the past)
> from happening while the RenderWidget was already closing due to the
> renderer-side detaching, but running a nested message loop.
>
> The RenderView destruction now already does a PostTask hop in
> RenderThreadImpl before starting destruction of the RenderViewImpl
> and its frame tree and RenderWidgets. A RenderWidget for a frame closes
> when the frame detaches, and that is built to be consistent even if
> it occurs inside of unload. The RenderWidget does not need to be kept
> around after the blink frame and RenderFrame and WebWidget associated
> with it are all gone.
>
> Popups and pepper RenderWidgets can close during a frame unload without
> a consistency problem.
>
> R=dcheng@chromium.org
>
> Bug: 419087
> Change-Id: Ia5f7ca07395f8a5bd2c60a974a0fb4fb5092d872
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1832612
> Reviewed-by: Avi Drissman <avi@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Commit-Queue: danakj <danakj@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#702868}

TBR=dcheng

Bug: 419087
Change-Id: I0f68df454e2873d7e6f3eeb38ff41563c16f6a76
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1841942
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#702977}
2019-10-04 19:03:16 +00:00
Samuel Huang
14360f7e78 Revert "Don't PostTask the RenderWidget::Close() call."
This reverts commit 8f0dc9682b.

Reason for revert: Suspected of causing webkit_layout_tests to fail in http/tests/misc/frame-detached-in-animationstart-event.html on WebKit Linux ASAN.

Original change's description:
> Don't PostTask the RenderWidget::Close() call.
> 
> The post task in RenderWidget was in order to keep IPC receipt of
> destruction of a frame-based RenderWidget (ie a RenderView in the past)
> from happening while the RenderWidget was already closing due to the
> renderer-side detaching, but running a nested message loop.
> 
> The RenderView destruction now already does a PostTask hop in
> RenderThreadImpl before starting destruction of the RenderViewImpl
> and its frame tree and RenderWidgets. A RenderWidget for a frame closes
> when the frame detaches, and that is built to be consistent even if
> it occurs inside of unload. The RenderWidget does not need to be kept
> around after the blink frame and RenderFrame and WebWidget associated
> with it are all gone.
> 
> Popups and pepper RenderWidgets can close during a frame unload without
> a consistency problem.
> 
> R=​dcheng@chromium.org
> 
> Bug: 419087
> Change-Id: Ia5f7ca07395f8a5bd2c60a974a0fb4fb5092d872
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1832612
> Reviewed-by: Avi Drissman <avi@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Commit-Queue: danakj <danakj@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#702868}

TBR=avi@chromium.org,danakj@chromium.org,dcheng@chromium.org

Change-Id: I6edf67e9d004c7f2fb4f3edd36b2a86f4cb5f27a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 419087
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1841941
Reviewed-by: Samuel Huang <huangs@chromium.org>
Commit-Queue: Samuel Huang <huangs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#702926}
2019-10-04 17:23:02 +00:00
danakj
8f0dc9682b Don't PostTask the RenderWidget::Close() call.
The post task in RenderWidget was in order to keep IPC receipt of
destruction of a frame-based RenderWidget (ie a RenderView in the past)
from happening while the RenderWidget was already closing due to the
renderer-side detaching, but running a nested message loop.

The RenderView destruction now already does a PostTask hop in
RenderThreadImpl before starting destruction of the RenderViewImpl
and its frame tree and RenderWidgets. A RenderWidget for a frame closes
when the frame detaches, and that is built to be consistent even if
it occurs inside of unload. The RenderWidget does not need to be kept
around after the blink frame and RenderFrame and WebWidget associated
with it are all gone.

Popups and pepper RenderWidgets can close during a frame unload without
a consistency problem.

R=dcheng@chromium.org

Bug: 419087
Change-Id: Ia5f7ca07395f8a5bd2c60a974a0fb4fb5092d872
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1832612
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#702868}
2019-10-04 15:06:45 +00:00
Mario Sanchez Prada
0ef3287124 Migrate references of viz::mojom::CompositorFrameSink* to new Mojo types
Convert the remaining bits in both the implementation and clients from the
browser and renderer processes for the viz::mojom::CompositorFrameSink and
viz::mojom::CompositorFrameSinkClient interfaces, and adapt unit tests.

Bug: 955171, 978694
Change-Id: Ic01dd94b8e070794df82668d01e0c45b058737f6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1835507
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: enne <enne@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Commit-Queue: Mario Sanchez Prada <mario@igalia.com>
Cr-Commit-Position: refs/heads/master@{#702863}
2019-10-04 14:52:34 +00:00
Sergio Villar Senin
ce85bcc0e5 Remove public/platform/web_cache.h dependency from chrome/browser
There are several includes of that header because code in chrome/browser and
content/ uses blink::WebCache::ResourceTypeStat(s).

In order to remove the dependency, the definitions of those structs were moved
out of the blink::WebCache class and placed on a new header file in
blink/public/common.

Bug: 1008303
Change-Id: Ic46f991c7a269eb227954c6b1fecdc639d8c8903
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1829381
Commit-Queue: Sergio Villar <svillar@igalia.com>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#701521}
2019-10-01 12:13:52 +00:00
Henrique Ferreiro
3a9751c1ad Migrate frame.mojom to the new Mojo types
Convert the implementation and all users of the content::mojom::Frame,
FrameBindingsControl, FrameFactory, KeepAliveHandle and FrameHost
interfaces.

Bug: 955171
Change-Id: I46cf976922f67cdce6b27bc9b3c21583f25fd375
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1798346
Commit-Queue: Henrique Ferreiro <hferreiro@igalia.com>
Reviewed-by: Oksana Zhuravlova <oksamyt@chromium.org>
Reviewed-by: Emily Stark <estark@chromium.org>
Reviewed-by: Camille Lamy <clamy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#701092}
2019-09-30 13:54:07 +00:00
Frank Liberato
fef772727c Revert "Lower priority of processes hosting exclusively ads."
This reverts commit 1ccd84e000.

Reason for revert: Many test failures due to static_cast @ rfhi.973

e.g.,: see https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8901140067480428272/+/steps/app_shell_unittests/0/logs/Deterministic_failure:_RootWindowControllerTest.AppWindows__status_CRASH_/0

Original change's description:
> Lower priority of processes hosting exclusively ads.
> 
> This change adds a variable to ChildProcessPriorityLauncher to
> indicate whether the associated process is only used to run tasks for
> ad frames (low priority frames).  That variable is then used by the
> RenderProcessHost to background the frame in those cases.  Notification
> happens in the RenderProcessHost via new UpdateFrameWithPriority.
> 
> Note: Identification of ad frames is done as per the AdTagging project.
> Frames that have been marked as ads remain ads, and thus the
> RenderProcessHost will remain low priority if the frame is navigated
> to any other non-ad URL within the same process (same domain).
> 
> Currently this is behind a feature which is off by default.
> We will be experimenting with this to determine its impact on
> both ads and in the browser as a whole.
> 
> Bug: 979234
> Change-Id: I33d33bc9c1af16b04db211fda25217bd0b2fa85f
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1645978
> Commit-Queue: Eric Robinson <ericrobinson@chromium.org>
> Reviewed-by: Josh Karlin <jkarlin@chromium.org>
> Reviewed-by: Alexander Timin <altimin@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
> Reviewed-by: Peter Boström <pbos@chromium.org>
> Reviewed-by: Gabriel Charette <gab@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#700786}

TBR=dcheng@chromium.org,gab@chromium.org,jkarlin@chromium.org,alexmos@chromium.org,pbos@chromium.org,altimin@chromium.org,ericrobinson@chromium.org

Change-Id: I5bd5742486245825babecd9eb53a54e0ad4adeac
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 979234
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1830323
Reviewed-by: Frank Liberato <liberato@chromium.org>
Commit-Queue: Frank Liberato <liberato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#700923}
2019-09-28 00:54:15 +00:00
Eric Robinson
1ccd84e000 Lower priority of processes hosting exclusively ads.
This change adds a variable to ChildProcessPriorityLauncher to
indicate whether the associated process is only used to run tasks for
ad frames (low priority frames).  That variable is then used by the
RenderProcessHost to background the frame in those cases.  Notification
happens in the RenderProcessHost via new UpdateFrameWithPriority.

Note: Identification of ad frames is done as per the AdTagging project.
Frames that have been marked as ads remain ads, and thus the
RenderProcessHost will remain low priority if the frame is navigated
to any other non-ad URL within the same process (same domain).

Currently this is behind a feature which is off by default.
We will be experimenting with this to determine its impact on
both ads and in the browser as a whole.

Bug: 979234
Change-Id: I33d33bc9c1af16b04db211fda25217bd0b2fa85f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1645978
Commit-Queue: Eric Robinson <ericrobinson@chromium.org>
Reviewed-by: Josh Karlin <jkarlin@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Peter Boström <pbos@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#700786}
2019-09-27 18:10:50 +00:00
Ken Rockot
47c47d8620 Remove most Connector usage from child processes
This removes almost all remaining usage of Connector from child
processes, instead preferring use of ChildProcessHost.BindHostReceiver
to acquire process-scoped interfaces from the browser.

The one remaining use case after this CL is for the Device Service's
PowerMonitor API. This is left as a separate change because it requires
substantial additional support code for testing.

Bug: 977637
Change-Id: I679c6d7f5ec01d1bc1bb6852e0f79a3f1650df34
Tbr: penghuang@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1815731
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#700317}
2019-09-26 17:38:07 +00:00
Kurt Catti-Schmidt
00de8c6db4 Update system colors dynamically
This change exposes LayoutTheme::PlatformColorsDidChange() through
WebRenderTheme. This allows system colors to update dynamically when
new colors are sent from the browser process.

Bug: 970285
Change-Id: Ic3b75dfec668dc5523b0e12765574e66dd35ff8f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1797057
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Kurt Catti-Schmidt <kschmi@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#700308}
2019-09-26 17:22:40 +00:00
Julie Jeongeun Kim
2ee1de49b4 Convert single_sample_metrics.mojom to new Mojo types
This CL converts SingleSampleMetricsProvider{Ptr,Request}
and SingleSampleMetric{Ptr, Request} to new Mojo types.

It also updates AcquireSingleSampleMetric from
single_sample_metrics.mojom  and members and methods
which implement it.

Bug: 955171
Change-Id: Ied581a2d392d8c3b4a68b8eacc046e013eac25d3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1810176
Reviewed-by: Sam McNally <sammc@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Oksana Zhuravlova <oksamyt@chromium.org>
Reviewed-by: Brian White <bcwhite@chromium.org>
Commit-Queue: Julie Kim <jkim@igalia.com>
Cr-Commit-Position: refs/heads/master@{#698758}
2019-09-21 11:50:31 +00:00
Julie Jeongeun Kim
7b4a6aa185 Convert DiscardableSharedMemoryManager to new Mojo types
This CL converts DiscardableSharedMemoryManagerPtr and
DiscardableSharedMemoryManagerRequest to new Mojo types.

It also update CreateGpuService from viz_main.mojom
and methods and members which implement it.

Bug: 955171
Change-Id: I3f02534df354edcc5baa09383ac0ad551e91d155
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1808950
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Sam McNally <sammc@chromium.org>
Reviewed-by: Eric Karl <ericrk@chromium.org>
Reviewed-by: Oksana Zhuravlova <oksamyt@chromium.org>
Reviewed-by: Peng Huang <penghuang@chromium.org>
Commit-Queue: Julie Kim <jkim@igalia.com>
Cr-Commit-Position: refs/heads/master@{#698477}
2019-09-20 14:57:12 +00:00
Antonio Gomes
78ad630a51 Reland "Revert PeerConnectionDependencyFactory Onion Soup CLs"
This reverts commit e942d99a55.

Reason for revert: crrev.com/c/1814598 was merged to trunk accidentally.

Original change's description:
> Revert "Revert PeerConnectionDependencyFactory Onion Soup CLs"
> 
> This reverts commit 62fa86d36f.
> 
> Reason for revert: <INSERT REASONING HERE>
> 
> Original change's description:
> > Revert PeerConnectionDependencyFactory Onion Soup CLs
> > 
> > This CL reverts several Onion Soup CLs related to PeerConnectionDependencyFactory.
> > The first one in the chain is the culprit for causing failures in some bots,
> > but in order to revert it, it is necessary to revert several follow-up CLs.
> > 
> > 
> > Revert "Onion soup PeerConnectionDependencyFactory and its direct dependencies"
> > 
> > This reverts commit 7e1e15c375.
> > 
> > Revert "Move filtering_network_manager.h and network_manager_uma.h out of the Blink API"
> > 
> > This reverts commit 8f18d55dd8.
> > 
> > Revert "Move stun_field_trial.h out of the Blink API"
> > 
> > This reverts commit e8cd34ee34.
> > 
> > Revert "Move {ipc,empty}_network_manager.h and out of Blink API"
> > 
> > This reverts commit 2dc64b396a.
> > 
> > Revert "Move socket_client.h out of the Blink API"
> > 
> > This reverts commit b2223b283a.
> > 
> > Revert "Remove rtc_video_{encoder,decoder}_factory_util.h from Blink API"
> > 
> > This reverts commit a438dfe161.
> > 
> > Revert "Move video_codec_factory.h out of the Blink API"
> > 
> > This reverts commit 2fa285a7c6.
> > 
> > Revert "Change blink::PeerConnectionDependencyFactory ownership"
> > 
> > This reverts commit a1ac2f02cd.
> > 
> > Revert "Replace uses of blink::Platform::GetWebRtcAudioDevice"
> > 
> > This reverts commit c19364a15a.
> > 
> > Revert "Remove left-over //content/renderer/p2p/"
> > 
> > This reverts commit f4bbeac1f9.
> > 
> > 
> > Bug: 1005604
> > TBR: treib@chromium.org
> > 
> > Change-Id: I6d287dc1d141721496d5e058639f268b73b1ab09
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1813306
> > Commit-Queue: Guido Urdaneta <guidou@chromium.org>
> > Auto-Submit: Guido Urdaneta <guidou@chromium.org>
> > Reviewed-by: Guido Urdaneta <guidou@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#698024}
> 
> TBR=guidou@chromium.org,jochen@chromium.org
> 
> Change-Id: I61215b50fb35dc3be9e3882f7fab36a7efcb53ec
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 1005604
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1814598
> Reviewed-by: Antonio Gomes <tonikitoo@igalia.com>
> Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
> Cr-Commit-Position: refs/heads/master@{#698089}

TBR=guidou@chromium.org,tonikitoo@igalia.com,jochen@chromium.org

Change-Id: I370ec337c06eb0250d832670cbe03dc1f3b536b9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1005604
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1814599
Reviewed-by: Antonio Gomes <tonikitoo@igalia.com>
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Cr-Commit-Position: refs/heads/master@{#698091}
2019-09-19 17:11:35 +00:00
Antonio Gomes
e942d99a55 Revert "Revert PeerConnectionDependencyFactory Onion Soup CLs"
This reverts commit 62fa86d36f.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Revert PeerConnectionDependencyFactory Onion Soup CLs
> 
> This CL reverts several Onion Soup CLs related to PeerConnectionDependencyFactory.
> The first one in the chain is the culprit for causing failures in some bots,
> but in order to revert it, it is necessary to revert several follow-up CLs.
> 
> 
> Revert "Onion soup PeerConnectionDependencyFactory and its direct dependencies"
> 
> This reverts commit 7e1e15c375.
> 
> Revert "Move filtering_network_manager.h and network_manager_uma.h out of the Blink API"
> 
> This reverts commit 8f18d55dd8.
> 
> Revert "Move stun_field_trial.h out of the Blink API"
> 
> This reverts commit e8cd34ee34.
> 
> Revert "Move {ipc,empty}_network_manager.h and out of Blink API"
> 
> This reverts commit 2dc64b396a.
> 
> Revert "Move socket_client.h out of the Blink API"
> 
> This reverts commit b2223b283a.
> 
> Revert "Remove rtc_video_{encoder,decoder}_factory_util.h from Blink API"
> 
> This reverts commit a438dfe161.
> 
> Revert "Move video_codec_factory.h out of the Blink API"
> 
> This reverts commit 2fa285a7c6.
> 
> Revert "Change blink::PeerConnectionDependencyFactory ownership"
> 
> This reverts commit a1ac2f02cd.
> 
> Revert "Replace uses of blink::Platform::GetWebRtcAudioDevice"
> 
> This reverts commit c19364a15a.
> 
> Revert "Remove left-over //content/renderer/p2p/"
> 
> This reverts commit f4bbeac1f9.
> 
> 
> Bug: 1005604
> TBR: treib@chromium.org
> 
> Change-Id: I6d287dc1d141721496d5e058639f268b73b1ab09
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1813306
> Commit-Queue: Guido Urdaneta <guidou@chromium.org>
> Auto-Submit: Guido Urdaneta <guidou@chromium.org>
> Reviewed-by: Guido Urdaneta <guidou@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#698024}

TBR=guidou@chromium.org,jochen@chromium.org

Change-Id: I61215b50fb35dc3be9e3882f7fab36a7efcb53ec
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1005604
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1814598
Reviewed-by: Antonio Gomes <tonikitoo@igalia.com>
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Cr-Commit-Position: refs/heads/master@{#698089}
2019-09-19 17:09:49 +00:00
Guido Urdaneta
62fa86d36f Revert PeerConnectionDependencyFactory Onion Soup CLs
This CL reverts several Onion Soup CLs related to PeerConnectionDependencyFactory.
The first one in the chain is the culprit for causing failures in some bots,
but in order to revert it, it is necessary to revert several follow-up CLs.


Revert "Onion soup PeerConnectionDependencyFactory and its direct dependencies"

This reverts commit 7e1e15c375.

Revert "Move filtering_network_manager.h and network_manager_uma.h out of the Blink API"

This reverts commit 8f18d55dd8.

Revert "Move stun_field_trial.h out of the Blink API"

This reverts commit e8cd34ee34.

Revert "Move {ipc,empty}_network_manager.h and out of Blink API"

This reverts commit 2dc64b396a.

Revert "Move socket_client.h out of the Blink API"

This reverts commit b2223b283a.

Revert "Remove rtc_video_{encoder,decoder}_factory_util.h from Blink API"

This reverts commit a438dfe161.

Revert "Move video_codec_factory.h out of the Blink API"

This reverts commit 2fa285a7c6.

Revert "Change blink::PeerConnectionDependencyFactory ownership"

This reverts commit a1ac2f02cd.

Revert "Replace uses of blink::Platform::GetWebRtcAudioDevice"

This reverts commit c19364a15a.

Revert "Remove left-over //content/renderer/p2p/"

This reverts commit f4bbeac1f9.


Bug: 1005604
TBR: treib@chromium.org

Change-Id: I6d287dc1d141721496d5e058639f268b73b1ab09
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1813306
Commit-Queue: Guido Urdaneta <guidou@chromium.org>
Auto-Submit: Guido Urdaneta <guidou@chromium.org>
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#698024}
2019-09-19 14:59:51 +00:00
danakj
cbf1304643 Make the widget_params optional in CreateFrame IPC.
Instead of signaling if the frame is a local root by sending a routing
id or not, and then based on that reading the VisualProperties or not,
make the whole widget_params structure optional, and only send it when
the frame is a local root. Then the VisualProperties are not included
in the IPC at all for non-local roots, nor a routing id.

This is a followup for https://chromium-review.googlesource.com/c/chromium/src/+/1797385

R=avi@chromium.org, dcheng@chromium.org

Bug: 419087
Change-Id: I49b735ec081aae6c4511a475535ce337ce2a5394
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1809988
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697763}
2019-09-18 21:01:47 +00:00
Xianzhu Wang
66e13e0a25 Remove LayerTreeHostCommon
Split layer_tree_host_common.h/cc into several parts:
- ScrollAndScaleSet => scroll_and_scale_set.h/cc (new files)
- CalculateLayerJitter() => LayerImpl::CalculateJitter()
- CalculateDrawProperties(LayerImpl*,...) => draw_property_utils.h/cc
- CalculateDrawPropertiesForTesting() => Combined into
    UpdateDrawProperties() in layer_test_common.h/cc
- GetPropertyTrees() => property_tree_test_utils.h/cc

Split layer_tree_host_common_unittest.cc into two parts:
- property_tree_builder_unittest.cc for tests testing
  PropertyTreeBuilder
- draw_properties_unittest.cc for the rest.

TBR= # tiny passive changes in components/viz and content/renderer

Bug: 994361
Change-Id: Ic6011c5849f5fded5e91eb2d0f592edc939b5ab2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1808797
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697756}
2019-09-18 20:39:12 +00:00
Antonio Gomes
a1ac2f02cd Change blink::PeerConnectionDependencyFactory ownership
... off of content::RenderThreadImpl.

This CL changes the ownership of blink::PeerConnectionDependencyFactory
as per section 5.1.1 in the design document [1].

[1] https://docs.google.com/document/d/1AJKVA5U4nDkyDB9p4ROrggWXadCxyy-grKaE9KS5vOU/

Quoting the document:

  "
  PeerConnectionDependencyFactory is currently owned by RenderThreadImpl in content,
  which makes it a single object per renderer process. This ownership must be moved to
  a suitable place in Blink. A possibility is to keep it as a global object (using
  DEFINE_STATIC_LOCAL).
  The disadvantage of this approach is that PCDF would never be destroyed, whereas
  it is currently destroyed by the RenderThreadImpl destructor, but this is acceptable.
  "

This move will allow a set of blink::Platform methods to be removed
(follow up CL).

BUG=787254
R=guidou@chromium.org, haraken@chromium.org

Change-Id: Ie79f13cfd90c56fcbed50142802b0fcda480c43e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1807657
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697750}
2019-09-18 20:27:36 +00:00
Antonio Gomes
7e1e15c375 Onion soup PeerConnectionDependencyFactory and its direct dependencies
This CL is the main CL that moves peer_connection_dependency_factory.cc|h
from content/renderer/media/webrtc to Blink.

Given that is has many dependencies on content/renderer/p2p and other
content classes, this work had various predecessor CLs, including:

- 1804541, 1795667, 1795669, 1795671, 1798266, 1798274, 1799102,
  1799085, 1801068, 1803260, 1803454.

Additionally, some other content/ files that PeerConnectionDependencyFactory
relies on could be moved independently to Blink easily, so this CL moves
them altogether. It includes the following files:

- host_address_request.cc|h
- ipc_socket_factory.cc|h
- mdns_responder_adapter.cc|h
- port_allocator.cc|h
- socket_client_impl.cc|h
- socket_dispatcher.cc|h

... all from content/renderer/p2p, that got moved to third_party/blink/renderer/platform/p2p.

Last, the following Blink (temporary header) got moved out of the API
layer, so its method signature could get updated properly:

- third_party/blink/public/platform/modules/p2p/socket_client_delegate.h (moved to)
  third_party/blink/renderer/platform/p2p/socket_client_delegate.h

For the sake of simplicity, this CL:

- keeps the ownership of PeerConnectionDependencyFactory in content's
  RenderThreadImpl. In a follow up CL, the ownership will moved to a
  suitable place in Blink. A possibility is to keep it as a global
  object (DEFINE_STATIC_LOCAL).

BUG=787254, 919392
R=guidou@chromium.org, haraken@chromium.org

Change-Id: I0dada58c447f0c8559ca4b590121f3313a1eebc0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1805159
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697582}
2019-09-18 13:15:00 +00:00
Gyuyoung Kim
ef648a2e72 Migrate CompositingModeReporter to the new Mojo types
This CL applies pending_remote to the first argument of
AddCompositionModeWatcher in CompositingModeReport interface.

Bug: 955171
Change-Id: I331573a1245d2ea1348aa4109bdfbc23cd402c58
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1804698
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: Oksana Zhuravlova <oksamyt@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Gyuyoung Kim <gyuyoung@igalia.com>
Cr-Commit-Position: refs/heads/master@{#697155}
2019-09-17 09:48:35 +00:00
Julie Jeongeun Kim
3930c63f1d Convert ResourceUsageReporter to new Mojo types
This CL converts ResourceUsageReporterPtr,
ResourceUsageReporterRequest to new Mojo types.

Bug: 955171
Change-Id: If0c5c388e76a866edd2ed7ef74375cfb700f7a75
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1797949
Commit-Queue: Julie Kim <jkim@igalia.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Oksana Zhuravlova <oksamyt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#695907}
2019-09-12 02:26:47 +00:00
Julie Jeongeun Kim
4421c2eddf Convert RenderFrameMetadataObserverClient to new Mojo types
This CL converts RenderFrameMetadataObserverClientRequest,
RenderFrameMetadataObserverClientPtr, and
RenderFrameMetadataObserverClientPtrInfo to new
Mojo types.

It also updates RegisterRenderFrameMetadataObserver
from frame_sink_provider.mojom and methods and members
which implements it with new Mojo types.

Bug: 955171
Change-Id: I1f1fefe865bff8e29b47f437b699e6ac55612881
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1795524
Commit-Queue: Julie Kim <jkim@igalia.com>
Reviewed-by: Oksana Zhuravlova <oksamyt@chromium.org>
Reviewed-by: Sam McNally <sammc@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#695504}
2019-09-11 06:34:39 +00:00
Julie Jeongeun Kim
6f4b7e05f2 Convert RenderFrameMetadataObserver to new Mojo types
This CL converts RenderFrameMetadataObserver to new
Mojo types.

It also updates RegisterRenderFrameMetadataObserver
from frame_sink_provider.mojom and methods and members
which implements it with new Mojo types.

Bug: 955171
Change-Id: I8f81269e18dd891a11142f55ddf1355ea4cec7d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1794942
Commit-Queue: Julie Kim <jkim@igalia.com>
Reviewed-by: Oksana Zhuravlova <oksamyt@chromium.org>
Reviewed-by: Sam McNally <sammc@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#695484}
2019-09-11 05:05:46 +00:00
Julie Jeongeun Kim
4e77af2624 Convert Renderer from //content/common/renderer.mojom to new Mojo types
This CL converts Renderer from //content/common/renderer.mojom
to new Mojo types.

It uses mojo::AssociatedRemote, mojo::PendingAssociatedReceiver,
and AssociatedReceiver instead of RendererAssociatedPtr,
<mojo::AssociatedInterfacePtr<mojom::Renderer>>,
RendererAssociatedRequest and AssociatedBinding.

Bug: 955171
Change-Id: I62e07c83ee79c2adfc7485b18127cdbf5fa18948
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1794543
Commit-Queue: Julie Kim <jkim@igalia.com>
Reviewed-by: Oksana Zhuravlova <oksamyt@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#695473}
2019-09-11 03:36:45 +00:00
Antonio Gomes
2cbbda1134 Make PeerConnectionDependencyFactory own P2PSocketDispatcher instance
... instead of RenderThreadImpl.

This is a preparation step to move
peer_connection_dependency_factory.cc|h from content/renderer to Blink.

Because P2PSocketDispatcher won't be able to reside in blink/public (not
even temporarily), the CL move its ownership off of RenderThreadImpl, into
PeerConnectionDependencyFactory so that the later is the only class that
refers to it.

This preliminary step is described on section 5 of the design document [1].

[1] https://docs.google.com/document/d/1AJKVA5U4nDkyDB9p4ROrggWXadCxyy-grKaE9KS5vOU/

BUG=787254
R=guidou@chromium.org, haraken@chromium.org

Change-Id: If0da61e1169a6b116d7704cf6827d7f4d507809a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1795669
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#695444}
2019-09-11 01:56:25 +00:00
Mario Sanchez Prada
5492c9a7ff Migrate references of content::mojom::FrameSinkProvider to new Mojo types
Convert both the implementation and clients in the browser and renderer
processes for the content.mojom.FrameSinkProvider interface, and
adapt unit tests.

Bug: 955171
Change-Id: I1b4d9769549648ee7f9dd30c310445093736b354
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1795329
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Oksana Zhuravlova <oksamyt@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Commit-Queue: Mario Sanchez Prada <mario@igalia.com>
Cr-Commit-Position: refs/heads/master@{#695316}
2019-09-10 20:58:11 +00:00
Kenichi Ishibashi
9fee4e7857 Reland: Make EmbeddedWorkerInstanceClient independent from Renderer
The original CL (crrev.com/c/1730889) was reverted because it
seemed to break some extension browser_tests on MSAN bot.
The issue was addressed by crrev.com/c/1775892.

The difference between the original CL and this CL are:
* Using thread pool instead of the IO thread. This change comes from
  crrev.com/c/1768490
* Using mojo type adapter. This change is required due to
  crrev.com/c/1757604

Original description:

This is practically a revert of https://crrev.com/c/1053042.
The previous change was made to ensure user agent is set for
RenderThreadImpl before creating service workers. However,
service worker code path doesn't rely on RenderThreadImpl's
user agent. User agent is passed as a part of
EmbeddedWorkerStartParams. We don't need to use mojo::Renderer
interface to create EmbeddedWorkerInstanceClient.

This change allows us to choose the thread to create
EmbeddedWorkerInstanceClient, which is a requirement for
off-the-main-thread service worker startup.

Bug: 692909
Change-Id: I96c348ff186254a29a58d0d16faa938f1b0aa272
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1758031
Commit-Queue: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#694027}
2019-09-06 00:14:47 +00:00
Miyoung Shin
6d4b367ec0 Convert UkmRecorderInterface to new Mojo types
This CL converts UkmRecorderInterface{Ptr, Request} in services,
blink and content to the new Mojo types.

Bug: 955171, 978694
Change-Id: Icb32c106509d909113c522f1ed363460ac5f6179
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1787023
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#693897}
2019-09-05 19:07:00 +00:00
Miyoung Shin
2be9da7a00 Convert DocumentInterfaceBroker to new Mojo types
This CL converts DocumentInterfaceBroker{Ptr, Request} in content,
blink, extension and media to the new Mojo types and uses
pending_remote<blink.mojom.DocumentInterfaceBroker> in
document_scoped_interface_bundle.mojom and
pending_receiver<blink.mojom.DocumentInterfaceBroker> in
frame_messages.mojom.

Bug: 955171, 978694
Change-Id: Ic0ccabb445febbf8b2bd81aa754fc0abecfb77b2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1781900
Commit-Queue: Miyoung Shin <myid.shin@igalia.com>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Oksana Zhuravlova <oksamyt@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#693066}
2019-09-04 09:04:10 +00:00
Erik Chen
460b4b5678 Fix crash due to re-entrant IPC for Renderer::Destroy.
Async IPCs can be invoked from re-entrant contexts in Blink. This means that we
can't synchronously destroy objects that may still be references on the stack.

Bug: 992315
Change-Id: Ie5fd5f1554c85181518c36aeb8645c843c072be6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1783062
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Erik Chen <erikchen@chromium.org>
Auto-Submit: Erik Chen <erikchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#692883}
2019-09-03 22:17:31 +00:00
Miyoung Shin
ab4ecdb6a2 Convert TRequest to PendingReceiver<T> in content
This CL converts TRequest to PendingReceiver<T> from the code using
BinderRegistry::AddInterface in content by adding the helper
function at https://crrev.com/c/1772056 and cleans up one-off
transitional helper functions that were added recently.

Bug: 955171
Change-Id: Id5f6b85b67d75a4204735ce8b72f6c3b8217dfe7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1778897
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Miyoung Shin <myid.shin@igalia.com>
Cr-Commit-Position: refs/heads/master@{#692673}
2019-09-03 16:20:11 +00:00
kylechar
a72974d759 Remove unused non-surface sync code.
Finish removing an unused parameter and the function to check if the
surface sync was enabled. Only cleanup in cc/* remains at this point.

Bug: 985009
Change-Id: Iea8755eb15c1521d1e9fea282cc7718cab5ea325
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1776783
Commit-Queue: kylechar <kylechar@chromium.org>
Reviewed-by: Stefan Zager <szager@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Cr-Commit-Position: refs/heads/master@{#691925}
2019-08-30 02:59:03 +00:00
Kenichi Ishibashi
0b9b91be0a OffMT service worker startup: Use a background thread to start service worker
Starting service workers on the IO thread turns out causing mysterious
race conditions (see the comment  of linked bug). It's hard to avoid
such race conditions. This CL uses a background thread to start service
workers.

Some methods in blink::scheduler::WorkerThread and blink::WorkerThread
use base::WaitableEvent and will be execution on a background thread
so we need to allow them to use base::ScopedAllowBaseSyncPrimitives.

This CL fixes wpt/shape-detection/idlharness.https.any.html when
OffMainThreadServiceWorkerStartup is enabled.

Bug: 996567
Change-Id: Id987e19e8874d471a961993eca842961c0b0d119
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1768490
Commit-Queue: Kenichi Ishibashi <bashi@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/master@{#691419}
2019-08-29 01:01:09 +00:00
Avi Drissman
0f324c125a Fix input spinner double-increment.
BUG=990863

Change-Id: Iafa06776aac05a379eb1bb16753edba2c85b8481
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1769337
Commit-Queue: Avi Drissman <avi@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#690751}
2019-08-27 16:07:15 +00:00
Ken Rockot
15253a482e Remove Connector usage from Blink
Renderer processes currently get all of their process-scoped interfaces
through a Connector. This moves them over to the ChildProcessHost API
which routes directly from the ChildThreadImpl to an IO-thread binding
associated with RenderProcessHostImpl.

The IO-thread BinderRegistry for RPHI is moved from ConnectionFilterImpl
to the IOThreadHostImpl to support this.

The few Blink callsites which use GetConnector()+GetBrowserServiceName()
have been updated to use a new
Platform::GetBrowserInterfaceBrokerProxy() API which returns a
pointer to the new ThreadSafeBrowserInterfaceBrokerProxy type.

This type looks and feels similar to BrowserInterfaceBrokerProxy,
but can be used from any thread. Thread-safety is a useful feature
for process-scoped interface binding, but incurs slight overhead
that is not necessary for context-scoped binding requests; hence the
new type.

As of this CL, use of Platform::GetInterfaceProvider() is
equivalent to Platform::GetThreadSafeBrowserInterfaceBrokerProxy()
in terms of where the requests get routed on the browser side, so
the former can be incrementally converted to the latter.

All dependencies on Connector and deprecated Service Manager service
names have been removed from Blink. Follow-up CLs will remove the
few remaining Connector dependencies from content/renderer and other
child process types, and convert all GetInterfaceProvider() callsites to
use GetBrowserInterfaceBrokerProxy() instead.

Bug: 977637
Change-Id: I60ec171002df812b7ad34b0d87fa972910620fa2
Tbr: yucliu@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1763226
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Patrick Monette <pmonette@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#689986}
2019-08-23 17:44:59 +00:00
Sadrul Habib Chowdhury
7349ce5bce viz: Remove LocalSurfaceIdProvider.
With surface-sync enabled on all platforms, LocalSurfaceIdProvider
is no longer needed.

TBR=kylechar@ for content/renderer removal

Bug: 854307, 985009
Change-Id: I7d778ad3d8465c238c225704b84e56640aa4bb71
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1762586
Commit-Queue: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: kylechar <kylechar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#688870}
2019-08-21 04:51:32 +00:00
Yi Gu
195ff38488 [CodeHealth] Remove IsVizHitTestingDrawQuadEnabled from features
Previously we had both kEnableVizHitTestDrawQuad (VizHitTesting v1) and
kEnableVizHitTestSurfaceLayer(v2). After v1 being shipped, the function
IsVizHitTestingDrawQuadEnabled() was no longer useful. It just returns
!IsVizHitTestingSurfaceLayerEnabled().

Bug: 917015
Change-Id: Id7791763704235238cf0cfbc91bbf580128fa543
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1762588
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Yi Gu <yigu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#688705}
2019-08-20 20:46:29 +00:00
Kenichi Ishibashi
a0620196a3 OffMT service worker startup: Create EmbeddedWorkerInstanceClient on the IO thread
Post a task to the IO thread to create EmbeddedWorkerInstanceClient
when off-the-main-thread service worker startup is enabled.

This is a tentative workaround to avoid some race conditions which
happen when we make EmbeddedWorkerInstanceClient independent from
RenderThreadImpl (see crbug.com/995134). Ideally we shouldn't need
to post a task. Instead we should bind EmbeddedWorkerInstanceClient
on the IO thread.

Bug: 538751
Change-Id: I4bdb54232fb7abde7d6d1dccf1ac3cb58db16a92
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1761888
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Commit-Queue: Kenichi Ishibashi <bashi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#688436}
2019-08-20 07:48:50 +00:00