13 Commits

Author SHA1 Message Date
Benjamin Lerman
f054a99b83 Sky: Use the authenticated network service.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1146813013
2015-06-09 09:46:18 +02:00
Aaron Boodman
88a3004d36 Simple multi-url support for mojo apps.
This patch makes it so that querystrings are no longer considered part of a mojo application's identity.

So if you connect to http://a?foo, then http://a?bar, you'll end up talking to the same application, just two different connections.

The URL of each connection is sent to the app via a new param in AcceptConnection().

This patch also adds some app tests that exercise http app loading, which wasn't tested before.

R=qsr@chromium.org

Review URL: https://codereview.chromium.org/943053003
2015-03-02 10:05:31 -08:00
James Robinson
174ea9f08e Remove last uses of InterfaceImpl<> in Sky C++ code
This switches to using StrongBinding<>s in sky's ContentHandlerImpl
and TestHarnessImpl implementations.

These are the last uses of the deprecated InterfaceImpl<> helper in
the mojo repo (more uses exist in other repos).

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/934403002
2015-02-18 18:17:50 -08:00
Aaron Boodman
17a6f3ed1a Pass the final URL an app was loaded from to the app in Initialize().
R=davemoore@chromium.org

Review URL: https://codereview.chromium.org/905583002
2015-02-10 13:54:19 -08:00
James Robinson
dddf8f294f Remove Client relationship between mojo.Shell/mojo.Application
Instead of mojo.Shell and mojo.Application being clients of each other
they are now separate interfaces. An implementation of mojo.Application
receives a handle to the shell in its Initialize call, as described in
this doc:

https://docs.google.com/document/d/1xjt_TPjTu0elix8fNdBgWmnjJdJAtqSr1XDS_C-Ct8E/edit?usp=sharing

An analogous change is made to the content handler definition.

In C++, this is handled by the mojo::ApplicationImpl class which stores
shell handle in its implementation of Initialize. Thus the only change
for most C++ applications is the meaning of the handle in MojoMain is
different, although mains that use the ApplicationRunners do the same
thing with it.  Connecting to other apps is largely the same although
instead of grabbing the ApplicationImpl's client() to talk to the shell
code must now use the ApplicationImpl::shell() getter.

In JavaScript, the initialization sequence is a bit different although
this is hidden mostly in the Application class which calls initialize()
on its subclass with the same set of parameters. Connecting to another
application looks different, especially for sky code using the shell
proxy handle exposed via internals. Hans has some ideas about how to
make this a bit nicer.

Python apps similarly need to change their startup sequence a bit. I
didn't find a common library to take care of this dance, although it's
possible I just missed it.

Other languages probably a bit of reworking - I fixed everything here
that is covered by mojob.py test but some might be missing.

This patch also uses typed handles (i.e. InterfacePtr<> or
InterfaceRequest<> or their type aliases) wherever possible instead of
ScopedMessagePipeHandle for clarity.

R=davemoore@chromium.org

Review URL: https://codereview.chromium.org/868463008
2015-01-26 17:53:08 -08:00
Aaron Boodman
798d05ee4a Add Application::RequestQuit().
This allows an application's host (typically the shell) to request the application to gracefully shut down.

There is not currently a caller. It will require additional work in application manager to do that.

R=davemoore@chromium.org

Review URL: https://codereview.chromium.org/853303004
2015-01-20 13:12:16 -08:00
James Robinson
be2f656ab1 Pass ServiceProvider and ServiceProvider& params in Connect
In preperation for removing the Client annotation from ServiceProvider
this passes a second parameter of type ServiceProvider in the shell and
application Connect calls. In this patch the type signatures are updated
but the second parameter is basically unused. The intention is that the
first parameter |services| will be used for the connecting application to
request services from the connected application (as it does currently)
and the second parameter |exported_services| be used for the connecting
application to provide services to the connected application. We have
very few services exported in the second direction today - I'll update
them to use the second parameter in a follow-up patch.

R=darin@chromium.org

Review URL: https://codereview.chromium.org/845593003
2015-01-14 14:33:07 -08:00
Colin Blundell
a450ba1353 Restructure public side of network service.
This CL goes from this:
  //mojo/services/public/cpp/network
  //mojo/services/public/interfaces/network

to this:
  //mojo/services/network/public/cpp
  //mojo/services/network/public/interfaces

This CL also makes the Mojo-side changes required to roll this change into
Chromium.

TBR=beng

Review URL: https://codereview.chromium.org/789243002
2014-12-10 16:28:40 +01:00
Benjamin Lerman
72a73fc07f Remove shutdown code from sky.
R=aa@chromium.org, eseidel@chromium.org

Review URL: https://codereview.chromium.org/783973002
2014-12-09 11:00:15 +01:00
Adam Barth
d906ce5b41 Break Sky's dependency on cc
We no longer link with cc. Instead, we use a simple, direct-to-Ganesh rendering
pipeline.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/752683002
2014-11-21 12:21:39 -08:00
Benjamin Lerman
ba6f3beacd Make sure that Content Handled application can be connected multiple times.
This CL updates ApplicationManager so that it always reconnect to an
application that is already launched.

To obtain this results, the following changes habe also been made:

1) The Loader interface has been simplified:
  - The pipe to the shell if given during the Load request, so that loader do
    not need to called RegisterLoadedApplication
2) PngViewer and PdfViewer allows multiple embedder to embed those.
3) For the second connection forward, Sky issue network request to get the
   content of the page to display.

R=aa@chromium.org

Review URL: https://codereview.chromium.org/741453002
2014-11-21 10:53:37 +01:00
Benjamin Lerman
35d410ab00 mojo: Update content handler API
WIP

R=aa@chromium.org, abarth@chromium.org, hansmuller@chromium.org

Review URL: https://codereview.chromium.org/687273002
2014-10-31 18:23:10 +01:00
Adam Barth
ae72930937 Open the Sky 2014-10-23 11:17:19 -07:00