0
Commit Graph

77 Commits

Author SHA1 Message Date
Ken Rockot
4f8c3c3d0a Move Font Service off Service Manager
This removes all Service Manager dependencies from the Font Service in
favor of direct Mojo interface connection. The browser maintains an
internal API for connecting new pipes to the in-process service
instance.

This requires ChildProcessHostImpl to support the BindHostReceiver()
mojom API for non-renderer child processes, as well as
plumbing it up to UtilityProcessHost and PluginProcessHost. Rather than
generic support through Service Manager with manifest-based filtering,
each process host type explicitly implements its support for binding the
FontService interface when requested by the child process.

This CL also fixes some thread-safety bugs in the existing Font Service
client library code which could cause the client endpoint and/or the
WeakPtrFactory to be destroyed on the wrong sequence. FontServiceThread
has been refactored to make the WeakPtrFactory unnecessary, and the
client endpoint is now always destroyed on the correct sequence.

Finally, this changes font_service_unittests to use an in-process
background service instance rather than using the Service Manager to
spin up a dedicated service executable.

Bug: 977637
Change-Id: I3efdafb06ae2d79e9cb149675e49c29e30d0cad6
Test: for good measure, manually tested PDF rendering
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1756435
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Cr-Commit-Position: refs/heads/master@{#687694}
2019-08-16 16:32:33 +00:00
Lucas Furukawa Gadani
0d5e714121 Remove more const interfaces from content/public.
Bug: 908139
Change-Id: Ib362d71f610a90fe094f3c4ed892ef578ebf85aa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1566417
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Lucas Gadani <lfg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#652379}
2019-04-18 23:00:50 +00:00
Tom Sepez
8db30ad046 Manage ppapi plugins on a per-origin basis.
Expands the management of plugins to consider origin when assigning
a process. Only passes empty origins at present, so no observable
change expected.

Bug: 809614
Change-Id: I129495ddc94c86dc1c4aa1b3a7942354eabe59d4
Reviewed-on: https://chromium-review.googlesource.com/915182
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Ehsan Karamad <ekaramad@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540294}
2018-03-01 21:38:54 +00:00
Brett Wilson
cc8623dc8e Replace std::deque and std::queue in //content.
These are replaced with the base versions base::circular_deque and base::queue.

Typedefs were replaced with using statements in changed code, and adjacent
typedefs were also converted.

RTCTimestamps struct in rtc_video_encoder.cc was made copyable and moveable
(it's just an int64 and an int32) to support being put in a circular_deque.
BrowsingDataRemoverImpl::RemovalTask was made move-only (from previously
not movable or copyable).

BUG=757232

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Change-Id: Ib83f929ae4c014ae0d3766a57e9cb56cba446e2b
Reviewed-on: https://chromium-review.googlesource.com/656066
Commit-Queue: Brett Wilson <brettw@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501169}
2017-09-12 03:28:10 +00:00
Ryan Sleevi
bb1cff42e6 Remove the (deprecated) ResourceContext from PluginClient
The PPAPI plugin client carried around an unused copy of the
ResourceContext associated with the initiator. Remove the dead code.

BUG=None

Change-Id: I6c8a8e2b3d23ee57975cc92cae2dfbbd0c9efdc0
Reviewed-on: https://chromium-review.googlesource.com/587587
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Ryan Sleevi <rsleevi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490093}
2017-07-27 23:25:17 +00:00
Lukasz Anforowicz
5a02412fd4 Move |field_trial_syncer_| into ChildThreadImpl.
There are 4 subclasses of ChildThreadImpl:
- RenderThreadImpl
- PpapiThread
- GpuChildThread
- UtilityThreadImpl

Before this CL, RenderThreadImpl and PpapiThread would have a
|field_trial_syncer_| field.  GpuChildThread would construct a
ChildProcessFieldTrialSyncer via ChromeContentGpuClient::Initialize, but
only if the GPU didn't share the browser process.  UtilityThreadImpl did
not have a |field_trial_syncer_| field.

Before this CL, RenderThreadImpl and GpuChildThread would notify the
browser process about trial activations by calling FieldTrialActivated
method of mojom::FieldTrialRecorder.  PpapiThread would notify via
PpapiHostMsg_FieldTrialActivated legacy IPC.  UtilityThreadImpl wouldn't
do anything.

After this CL, ChildProcessFieldTrialSyncer and
base::FieldTrialList::Observer are encapsulated and hidden by
ChildThreadImpl.

Also - after this CL, the //content -> //components/variations
dependency is sighly more restricted.

Bug: 740726
Change-Id: I2fdf4e16f52a7339476e337f695b44e621d0b295
Reviewed-on: https://chromium-review.googlesource.com/567034
Commit-Queue: Lukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: Nick Carter <nick@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Alexei Svitkine (slow) <asvitkine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487993}
2017-07-19 21:31:57 +00:00
jamescook
37acc25307 Remove unused copies of EarlyZygoteLaunch()
It looks like this function got cargo-culted around during refactors.

* Remove unused copies for NaCl, utility process and PPAPI
* Inline the one used copy from RenderProcessHostImpl into BrowserMainLoop

No behavior changes.

BUG=none
TEST=bots

Review-Url: https://codereview.chromium.org/2848603003
Cr-Commit-Position: refs/heads/master@{#468015}
2017-04-28 15:54:51 +00:00
asvitkine
92c1a93972 Field trial synchronization to PPAPI process.
This enables the same field trial synchronization mechanism we use for
renderers and GPU process for the PPAPI process. With this CL, crash reports
from PPAPI process will include active field trials and field trials activated
in the PPAPI process will be reported to UMA and crash.

Moves child_process_field_trial_syncer.cc from chrome
to components along the way.

BUG=582602
TEST=In an official Chrome build with crash reporting enabled, verify you have
Variations hashes listed in chrome://version (restart if you don't) and then go
to http://www.adobe.com/software/flash/about/ and load some flash content
before going to chrome://ppapiflashcrash to cause a PPAPI crash. Then, find the
the crash entry that should now appear on chrome://crashes and view it on
http://crash/ via the Server ID and check that the crash report has entries
under Experiments (under Fields).

Review-Url: https://codereview.chromium.org/2514593002
Cr-Commit-Position: refs/heads/master@{#434384}
2016-11-24 19:55:25 +00:00
chili
59caaddfd7 Rename off the record to incognito in ppapi plugin process
BUG=3333
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/2317243002
Cr-Commit-Position: refs/heads/master@{#417653}
2016-09-09 18:54:07 +00:00
rockot
da98879041 Establish MojoChildConnection from BrowserChildProcessHostImpl
Rather than have individual BrowserChildProcessHostImpl users
create their own connection, this moves all that junk into BCPHI
and allows its users to configure it with a service name and
instance ID.

Also changes ChildProcessHost to support ChannelMojo connection
via remote interfaces provided by its delegate, and uses this
in conjunction with the BCPHI changes. Eliminates one more use
of kMojoChannelToken.

BUG=623396
R=ben@chromium.org

Committed: https://crrev.com/8efa71b85282fb4df1d3836a20d086d223df714f
Review-Url: https://codereview.chromium.org/2221153003
Cr-Original-Commit-Position: refs/heads/master@{#410937}
Cr-Commit-Position: refs/heads/master@{#413232}
2016-08-19 20:48:34 +00:00
foolip
83cff6863f Revert of Establish MojoChildConnection from BrowserChildProcessHostImpl (patchset id:190001 of https://codereview.chromium.org/2221153003/ )
Reason for revert:
ContentBrowserTest.BrowserCrashCallStack/RendererCrashCallStack are failing on
"Linux Tests (dbg)(1)" and "Linux Tests (dbg)(1)(32)" since this CL. Reproduced
locally and bisected to "Establish MojoChildConnection from
BrowserChildProcessHostImpl", also verified that reverting it on master locally
fixes the problem.

When it fails, the tests stall for a long time before failing. Sample from bot:

ContentBrowserTest.RendererCrashCallStack (run ):
[ RUN      ] ContentBrowserTest.RendererCrashCallStack
[11795:11795:0810/064214:8507100974:WARNING:audio_manager.cc(317)] Multiple instances of AudioManager detected
[11795:11795:0810/064214:8507101034:WARNING:audio_manager.cc(278)] Multiple instances of AudioManager detected
Xlib:  extension "RANDR" missing on display ":9".
BrowserTestBase signal handler received SIGTERM. Backtrace:
 0x7fdba1ca413e base::debug::StackTrace::StackTrace()
 0x00000145ffaa content::(anonymous namespace)::DumpStackTraceSignalHandler()
 0x7fdb929cf0b0 <unknown>
 0x7fdb92d65d2b __libc_read
 0x7fdba1db7e42 base::GetAppOutputInternal()
 0x7fdba1db7ff6 base::GetAppOutputAndError()
 0x000000993436 content::ContentBrowserTest_RendererCrashCallStack_Test::RunTestOnMainThread()
 0x00000144f6ae content::ContentBrowserTest::RunTestOnMainThreadLoop()
 0x00000145fd24 content::BrowserTestBase::ProxyRunTestOnMainThreadLoop()
 0x0000005b969d _ZN4base8internal13FunctorTraitsIMN4mojo13StrongBindingIN6device14BatteryMonitorEEEFvvEvE6InvokeIPS6_JEEEvS8_OT_DpOT0_
 0x0000005b95f1 _ZN4base8internal12InvokeHelperILb0EvE8MakeItSoIRKMN4mojo13StrongBindingIN6device14BatteryMonitorEEEFvvEJPS8_EEEvOT_DpOT0_
 0x000001461247 _ZN4base8internal7InvokerINS0_9BindStateIMN7content15BrowserTestBaseEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE7RunImplIRKS6_RKSt5tupleIJS8_EEJLm0EEEEvOT_OT0_NS_13IndexSequenceIJXspT1_EEEE
 0x0000014611ac _ZN4base8internal7InvokerINS0_9BindStateIMN7content15BrowserTestBaseEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE3RunEPNS0_13BindStateBaseE
 0x0000005b971e base::Callback<>::Run()
 0x0000015920a8 content::ShellBrowserMainParts::PreMainMessageLoopRun()
 0x7fdba3457031 content::BrowserMainLoop::PreMainMessageLoopRun()
 0x7fdba29ee2bd _ZN4base8internal13FunctorTraitsIMN4mojo10BindingSetIN7content5mojom14ProcessControlEE7ElementEFvvEvE6InvokeIPS8_JEEEvSA_OT_DpOT0_
 0x7fdba345f091 _ZN4base8internal12InvokeHelperILb0EiE8MakeItSoIRKMN7content15BrowserMainLoopEFivEJPS5_EEEiOT_DpOT0_
 0x7fdba345f037 _ZN4base8internal7InvokerINS0_9BindStateIMN7content15BrowserMainLoopEFivEJNS0_17UnretainedWrapperIS4_EEEEEFivEE7RunImplIRKS6_RKSt5tupleIJS8_EEJLm0EEEEiOT_OT0_NS_13IndexSequenceIJXspT1_EEEE
 0x7fdba345ef9c _ZN4base8internal7InvokerINS0_9BindStateIMN7content15BrowserMainLoopEFivEJNS0_17UnretainedWrapperIS4_EEEEEFivEE3RunEPNS0_13BindStateBaseE
 0x7fdba29ee36e base::Callback<>::Run()
 0x7fdba3ef057b content::StartupTaskRunner::RunAllTasksNow()
 0x7fdba3455033 content::BrowserMainLoop::CreateStartupTasks()
 0x7fdba346164d content::BrowserMainRunnerImpl::Initialize()
 0x000001541fc4 ShellBrowserMain()
 0x000001521e46 content::ShellMainDelegate::RunProcess()
 0x7fdba5057e3b content::RunNamedProcessTypeMain()
 0x7fdba505a172 content::ContentMainRunnerImpl::Run()
 0x7fdba5056f42 content::ContentMain()
 0x00000145fa46 content::BrowserTestBase::SetUp()
 0x00000144f52d content::ContentBrowserTest::SetUp()
 0x0000016a05da testing::internal::HandleSehExceptionsInMethodIfSupported<>()
 0x000001691b0e testing::internal::HandleExceptionsInMethodIfSupported<>()
 0x0000016868a3 testing::Test::Run()
 0x000001687098 testing::TestInfo::Run()
 0x00000168763a testing::TestCase::Run()
 0x00000168c98c testing::internal::UnitTestImpl::RunAllTests()
 0x0000016a4d6a testing::internal::HandleSehExceptionsInMethodIfSupported<>()
 0x0000016931ee testing::internal::HandleExceptionsInMethodIfSupported<>()
 0x00000168c62f testing::UnitTest::Run()
 0x0000014d1d11 RUN_ALL_TESTS()
 0x0000014d0bc2 base::TestSuite::Run()
 0x00000145edcc content::ContentTestLauncherDelegate::RunTestSuite()
 0x00000149b712 content::LaunchTests()
 0x00000145ec28 main
 0x7fdb929ba7ed __libc_start_main
 0x0000005612c5 <unknown>

Original issue's description:
> Establish MojoChildConnection from BrowserChildProcessHostImpl
>
> Rather than have individual BrowserChildProcessHostImpl users
> create their own connection, this moves all that junk into BCPHI
> and allows its users to configure it with a service name and
> instance ID.
>
> Also changes ChildProcessHost to support ChannelMojo connection
> via remote interfaces provided by its delegate, and uses this
> in conjunction with the BCPHI changes. Eliminates one more use
> of kMojoChannelToken.
>
> BUG=623396
> R=ben@chromium.org
>
> Committed: https://crrev.com/8efa71b85282fb4df1d3836a20d086d223df714f
> Cr-Commit-Position: refs/heads/master@{#410937}

TBR=ben@chromium.org,rockot@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=623396

Review-Url: https://codereview.chromium.org/2230283003
Cr-Commit-Position: refs/heads/master@{#411039}
2016-08-10 14:53:18 +00:00
rockot
8efa71b852 Establish MojoChildConnection from BrowserChildProcessHostImpl
Rather than have individual BrowserChildProcessHostImpl users
create their own connection, this moves all that junk into BCPHI
and allows its users to configure it with a service name and
instance ID.

Also changes ChildProcessHost to support ChannelMojo connection
via remote interfaces provided by its delegate, and uses this
in conjunction with the BCPHI changes. Eliminates one more use
of kMojoChannelToken.

BUG=623396
R=ben@chromium.org

Review-Url: https://codereview.chromium.org/2221153003
Cr-Commit-Position: refs/heads/master@{#410937}
2016-08-10 03:11:50 +00:00
yzshen
92cad45212 Ignore certain messages in plugin broker process if they are not sent by the
browser.

BUG=610600
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/2069853002
Cr-Commit-Position: refs/heads/master@{#400495}
2016-06-17 20:43:08 +00:00
amistry
80ce6dc508 Use ChannelMojo for pepper plugin processes.
BUG=604282

Review-Url: https://codereview.chromium.org/2021103004
Cr-Commit-Position: refs/heads/master@{#398420}
2016-06-07 23:54:38 +00:00
dcheng
5971627d34 Convert //content/browser from scoped_ptr to std::unique_ptr
BUG=554298
R=avi@chromium.org

Review URL: https://codereview.chromium.org/1874893002

Cr-Commit-Position: refs/heads/master@{#386285}
2016-04-09 05:20:41 +00:00
kerrnel
afd49a83be Have each SandboxedProcessLauncherDelegate maintain a zygote.
To improve component updates of PPAPI plugins, Chrome needs multiple zygotes.
This will allow the PPAPI zygote to be recreated when a plugin is updated.
This CL allows Chrome to maintain a zygote for each process type by having
each SandboxedProcessLauncherDelegate maintain a class which can communicate
with its respective zygote. This CL will be followed up with work to allow
customization of zygotes, which will give Chrome the improve component update
experience.

BUG=569191

Committed: https://crrev.com/3c1e16b490255119b6f70f94d1716645e897b185
Cr-Commit-Position: refs/heads/master@{#370488}

Review URL: https://codereview.chromium.org/1532423003

Cr-Commit-Position: refs/heads/master@{#371042}
2016-01-22 21:17:03 +00:00
kerrnel
72832708f8 Revert of Have each SandboxedProcessLauncherDelegate maintain a zygote. (patchset id:440001 of https://codereview.chromium.org/1532423003/ )
Reason for revert:
Revert "Have each SandboxedProcessLauncherDelegate maintain a zygote."

This reverts commit 3c1e16b490.
This broke the Site Isolation FYI bot failure:
https://build.chromium.org/p/chromium.fyi/builders/Site%20Isolation%20Linux/builds/7700

To re-land the CL, that failure needs to be diagnosed and corrected.

Original issue's description:
> Have each SandboxedProcessLauncherDelegate maintain a zygote.
>
> To improve component updates of PPAPI plugins, Chrome needs multiple zygotes.
> This will allow the PPAPI zygote to be recreated when a plugin is updated.
> This CL allows Chrome to maintain a zygote for each process type by having
> each SandboxedProcessLauncherDelegate maintain a class which can communicate
> with its respective zygote. This CL will be followed up with work to allow
> customization of zygotes, which will give Chrome the improve component update
> experience.
>
> BUG=569191
>
> Committed: https://crrev.com/3c1e16b490255119b6f70f94d1716645e897b185
> Cr-Commit-Position: refs/heads/master@{#370488}

TBR=mdempsky@chromium.org,thestig@chromium.org,avi@chromium.org,mseaborn@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=569191

Review URL: https://codereview.chromium.org/1617213002

Cr-Commit-Position: refs/heads/master@{#370771}
2016-01-21 20:30:12 +00:00
kerrnel
3c1e16b490 Have each SandboxedProcessLauncherDelegate maintain a zygote.
To improve component updates of PPAPI plugins, Chrome needs multiple zygotes.
This will allow the PPAPI zygote to be recreated when a plugin is updated.
This CL allows Chrome to maintain a zygote for each process type by having
each SandboxedProcessLauncherDelegate maintain a class which can communicate
with its respective zygote. This CL will be followed up with work to allow
customization of zygotes, which will give Chrome the improve component update
experience.

BUG=569191

Review URL: https://codereview.chromium.org/1532423003

Cr-Commit-Position: refs/heads/master@{#370488}
2016-01-20 21:12:37 +00:00
avi
b7348940d3 Switch to standard integer types in content/browser/.
BUG=138542
TBR=jam@chromium.org

Review URL: https://codereview.chromium.org/1549113002

Cr-Commit-Position: refs/heads/master@{#366868}
2015-12-25 20:58:00 +00:00
tommycli
c7634dec83 Plugin Power Saver: Throttled Plugins should block TCPSocket reads.
BUG=458687, 403800

Review URL: https://codereview.chromium.org/929483004

Cr-Commit-Position: refs/heads/master@{#316963}
2015-02-19 01:47:04 +00:00
dcheng
c2282aa891 Standardize usage of virtual/override/final in content/browser/
This patch was automatically generated by applying clang fixit hints
generated by the plugin to the source tree.

BUG=417463
TBR=sky@chromium.org

Review URL: https://codereview.chromium.org/667943003

Cr-Commit-Position: refs/heads/master@{#300469}
2014-10-21 12:08:25 +00:00
mohan.reddy
7fc3ac7d5a Replace FINAL and OVERRIDE with their C++11 counterparts in content
This step is a giant search and replace for OVERRIDE and FINAL to
replace them with their lowercase versions.

BUG=417463

Review URL: https://codereview.chromium.org/637183002

Cr-Commit-Position: refs/heads/master@{#298804}
2014-10-09 05:24:24 +00:00
brettw@chromium.org
fcf75d4016 Convert string16 to base::string16 in content.
BUG=

Review URL: https://codereview.chromium.org/102593002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238447 0039d316-1c4b-4281-b951-d872f2087c98
2013-12-03 20:11:26 +00:00
ygorshenin@chromium.org
8522332eef TCPSockets are switched to the new Pepper proxy.
BUG=230784
TEST=browser_tests:*TCPSocket*, *TCPServerSocket*

Review URL: https://chromiumcodereview.appspot.com/22923014

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220073 0039d316-1c4b-4281-b951-d872f2087c98
2013-08-28 19:42:59 +00:00
rsesek@chromium.org
fa20e0076d Update include paths in content/browser for base/process changes.
BUG=242290
TBR=sky@chromium.org

Review URL: https://codereview.chromium.org/19495006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213225 0039d316-1c4b-4281-b951-d872f2087c98
2013-07-23 21:20:54 +00:00
avi@chromium.org
348fbaac32 Use a direct include of strings headers in content/browser/, part 2.
BUG=247723
TEST=none
TBR=ben@chromium.org

Review URL: https://chromiumcodereview.appspot.com/16625010

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205435 0039d316-1c4b-4281-b951-d872f2087c98
2013-06-11 06:31:51 +00:00
raymes@chromium.org
c542557af5 Allow renderer to create pepper ResourceHosts in the browser
This CL allows pending ResourceHosts to be created in the browser from the renderer. The functionality is currently exposed through the RendererPpapiHost. The creation call is asynchronous - a callback will be called in the renderer with a pending host ID when the host has been created.

BUG=246396

Review URL: https://chromiumcodereview.appspot.com/15947004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204954 0039d316-1c4b-4281-b951-d872f2087c98
2013-06-07 22:15:25 +00:00
brettw@chromium.org
57999817d3 Move file_path.h to base/files.
TBR=sky

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184344 0039d316-1c4b-4281-b951-d872f2087c98
2013-02-24 05:40:52 +00:00
brettw@chromium.org
2dec8ec385 Use base namespace for FilePath in content/browser
Review URL: https://codereview.chromium.org/12213066

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181349 0039d316-1c4b-4281-b951-d872f2087c98
2013-02-07 19:20:34 +00:00
yzshen@chromium.org
029bd94e73 Add two new debug URLs for Pepper Flash:
- chrome://ppapiflashcrash
- chrome://ppapiflashhang

TEST=none
BUG=169915


Review URL: https://chromiumcodereview.appspot.com/11883026

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177983 0039d316-1c4b-4281-b951-d872f2087c98
2013-01-22 08:30:33 +00:00
brettw@chromium.org
108fd342d9 Use an explicit PID for duplicating Pepper handles rather than the Channel's.
When the browser process launches the plugin, it explicitly tells each side the PID of the other side, and we now use this PID for sharing handles. Previously we'd use the PID from the IPC channel.

Using the PID from the IPC channel creates a race condition because the PID isn't set until the "hello" message from the opposite side is processed, which isn't guaranteed at any particular time.

BUG=168222

Review URL: https://codereview.chromium.org/11722017

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175190 0039d316-1c4b-4281-b951-d872f2087c98
2013-01-04 20:46:54 +00:00
raymes@chromium.org
83d12c8ddc Implement an IsAllowed function in the pepper PPB_Broker_Trusted API
Flash sometimes needs to synchronously know if it can launch the broker, otherwise it will try to launch the broker when it shouldn't, and end up popping an infobar. This adds an IsAllowed function to synchronously test whether the broker is allowed to launch without popping the infobar.

Note that the document URL of the plugin instance is needed in order to check the broker permissions in the browser process. This is only available in the renderer process. In order to avoid an extra hop to the renderer process just to get this URL, it is sent to the browser (with the render view ID) upon initialization of the instance when the instance is registered with the browser process.

BUG=163248


Review URL: https://chromiumcodereview.appspot.com/11316316

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172104 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-10 19:28:46 +00:00
raymes@chromium.org
0c92b0d107 Refactored the PPB_Flash_File_ModuleLocal/FileRef to the new ppapi resource model
The refactors PPB_Flash_File_ModuleLocal/FileRef to the new resource model. Calls for both these interfaces are now made directly to the browser. This removes the in-process implementation for these interfaces also (as they are flash-only). Tests are added for PPB_Flash_File_ModuleLocal.

Review URL: https://codereview.chromium.org/11359097

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171902 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-08 00:46:23 +00:00
raymes@chromium.org
8b73c2e491 Revert 171408
> The refactors PPB_Flash_File_ModuleLocal/FileRef to the new resource model. Calls for both these interfaces are now made directly to the browser. This removes the in-process implementation for these interfaces also (as they are flash-only). Tests are added for PPB_Flash_File_ModuleLocal.
>
> Review URL: https://codereview.chromium.org/11359097

TBR=raymes@chromium.org

Review URL: https://codereview.chromium.org/11437038

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171562 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-06 19:32:42 +00:00
raymes@chromium.org
cd57d088c6 Revert 171389
The revert is causing browser tests to fail. Reverting the revert.

> Revert 171080
>
> > The refactors PPB_Flash_File_ModuleLocal/FileRef to the new resource model. Calls for both these interfaces are now made directly to the browser. This removes the in-process implementation for these interfaces also (as they are flash-only). Tests are added for PPB_Flash_File_ModuleLocal.
> >
> > Review URL: https://codereview.chromium.org/11359097
>
> TBR=raymes@chromium.org
>
> Review URL: https://codereview.chromium.org/11437038

TBR=raymes@chromium.org

Review URL: https://codereview.chromium.org/11450025

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171408 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-06 06:10:57 +00:00
raymes@chromium.org
d146b8bf4a Revert 171080
> The refactors PPB_Flash_File_ModuleLocal/FileRef to the new resource model. Calls for both these interfaces are now made directly to the browser. This removes the in-process implementation for these interfaces also (as they are flash-only). Tests are added for PPB_Flash_File_ModuleLocal.
>
> Review URL: https://codereview.chromium.org/11359097

TBR=raymes@chromium.org

Review URL: https://codereview.chromium.org/11437038

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171389 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-06 03:25:24 +00:00
raymes@chromium.org
2432c05835 The refactors PPB_Flash_File_ModuleLocal/FileRef to the new resource model. Calls for both these interfaces are now made directly to the browser. This removes the in-process implementation for these interfaces also (as they are flash-only). Tests are added for PPB_Flash_File_ModuleLocal.
Review URL: https://codereview.chromium.org/11359097

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171080 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-04 23:32:50 +00:00
bbudge@chromium.org
0c719374f8 Add support for external out-of-process PPAPI plugins in the browser.
- Modifies content::BrowserPpapiHostImpl so it's not ref-counted.
- Adds a public content API method, BrowserPpapiHost::CreateExternalPluginProcess
  which allows the embedder to associate a browser ppapi host with a plugin process.
- Adds a public content API method, ContentBrowserClient::GetExternalBrowserPpapiHost,
  so content can track instance creation and deletion for external plugins (e.g. NaCl)
- Removes the content API method EnablePepperSupportForChannel. This is now done
  when creating the BrowserPpapiHost.
BUG=116317
TEST=none

Review URL: https://chromiumcodereview.appspot.com/11368019

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166480 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-07 19:05:03 +00:00
jam@chromium.org
130757671d Move the remaning files in content\common to the content namespace.
Review URL: https://codereview.chromium.org/11235068

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163732 0039d316-1c4b-4281-b951-d872f2087c98
2012-10-24 00:26:19 +00:00
brettw@chromium.org
195d4cde0d Hook up PpapiPermissions in more places.
This doesn't actually do much more checking of the permissions, but it should wire it up everywhere we'll need it. It will also at least only return public interfaces via GetInterface in the proxy now unless other bits are supplied.

Review URL: https://codereview.chromium.org/10984094

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159729 0039d316-1c4b-4281-b951-d872f2087c98
2012-10-02 18:12:41 +00:00
cevans@chromium.org
ef97ce340c Handle crashing Pepper plug-ins the same as crashing NPAPI plug-ins.
BUG=151895

Review URL: https://chromiumcodereview.appspot.com/10956065

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158364 0039d316-1c4b-4281-b951-d872f2087c98
2012-09-24 20:05:02 +00:00
brettw@chromium.org
b7631cc577 Convert the async device ID getter to a chrome resource host
Review URL: https://codereview.chromium.org/10909138

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156989 0039d316-1c4b-4281-b951-d872f2087c98
2012-09-15 05:08:38 +00:00
brettw@chromium.org
f511881bed Add a skeleton gamepad resource.
This implements the skeleton of the gamepad resource for the IPC proxy. It is not actually hooked up. Hooking it up will require moving some gamepad lock code to a shared location.

This also hooks up the browser message routing for implementing resource hosts in the browser process.

BUG=

Review URL: https://chromiumcodereview.appspot.com/10824272

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153265 0039d316-1c4b-4281-b951-d872f2087c98
2012-08-24 19:54:30 +00:00
brettw@chromium.org
93df81ea49 Bluetooth API: improve discovery
This CL:
- eliminates unnecessary dispatches
- correctly handles devices that are discovered before interest is
registered

TEST=ran api test
BUG=133179

Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=150898

Review URL: https://chromiumcodereview.appspot.com/10815072

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151138 0039d316-1c4b-4281-b951-d872f2087c98
2012-08-10 22:22:46 +00:00
brettw@chromium.org
b27d28862d Wire up a PPAPI host in content/browser.
Nothing actually uses this yet. I plumbed through a PpapiHost and the permissions through the message filter.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10696132

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146816 0039d316-1c4b-4281-b951-d872f2087c98
2012-07-16 16:55:18 +00:00
ajwong@chromium.org
f78671752a Remove #pragma once from content
Review URL: https://chromiumcodereview.appspot.com/10696166

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146071 0039d316-1c4b-4281-b951-d872f2087c98
2012-07-11 07:04:07 +00:00
brettw@chromium.org
2ddef57a0f Move Pepper files in renderer_host to new subdir.
I'm going to be adding more stuff here and refactoring this existing stuff.
This will mirror content/renderer/pepper.

TEST=none
BUG=none

Review URL: https://chromiumcodereview.appspot.com/10699043

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145360 0039d316-1c4b-4281-b951-d872f2087c98
2012-07-03 19:56:00 +00:00
rsleevi@chromium.org
512d03f78c RefCounted types should not have public destructors, delegate cleanup
For Delegate/Observer-type classes that specify an
interface but do not have any particular lifetime
requirements, make their destructors protected. This is to
allow their interfaces to be implemented safely by
RefCounted types. With public destructors, it's possible to
do "scoped_ptr<Delegate> foo", and then assign a
RefCountedDelegateImpl, which would lead to a double free.

As none of these Delegates actually need public destructors
(ownership of the Delegate* is not transferred during a
function call / class constructor), mark the destructors
protected so that it becomes a compile warning to try to
delete them via the Delegate*.

BUG=123295
TEST=it compiles


Review URL: https://chromiumcodereview.appspot.com/10383262

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144086 0039d316-1c4b-4281-b951-d872f2087c98
2012-06-26 01:06:06 +00:00
brettw@chromium.org
d84effeba5 Use IPC::Sender and IPC::Listener in content.
This replaces uses of IPC::Message::Sender with IPC::Sender and
IPC::Channel::Listener with IPC::Listener. I also fixed up header files where
it was obvious.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10662005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143920 0039d316-1c4b-4281-b951-d872f2087c98
2012-06-25 17:03:10 +00:00
tsepez@chromium.org
3f2b288cf6 Open pepper files directly in browser.
This CL merges in the changes for the per-profile plugin process from the
previously retired CL.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=140093
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=140399
Review URL: https://chromiumcodereview.appspot.com/10387195

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140602 0039d316-1c4b-4281-b951-d872f2087c98
2012-06-05 20:46:29 +00:00