32 Commits

Author SHA1 Message Date
Adam Barth
27359c558f Add tracing to oknet
R=rafaelw@chromium.org

Review URL: https://codereview.chromium.org/1018393006
2015-03-23 13:22:13 -07:00
Adam Barth
97abc0dadd Improve Material ink effects
1) Factors InkWell out of Material so that components can use an ink well
   without needing the shadow/level machinery.

2) Makes the ink effect move at a different velocity once the tap has actually
   occurred, converging with the spec. We don't have the right speeds yet, but
   at least we're approaching the right shape.

3) To support (2), added a primaryPointer attribute to GestureEvents to let
   authors coorelate gesturetapdown events with later gesturetap events.

4) To support (2), modernized SplashAnimation to used AnimatedValue and friends.

5) Added more constants to view-configuration.dart that match Android.

I've also removed the cancelling of the ink effect on scroll. The proper way to
do that is to notice that someone in the event chain is listening for
scrollstart and delay the beginning of the ink effect for some period of time.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1019023003
2015-03-19 11:17:48 -07:00
Eric Seidel
03234dcfaf Log to android logger when loads fail in oknet.
This makes it much easier to debug (otherwise silent) 404s of images, etc.

R=abarth@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1019103002
2015-03-18 14:15:09 -07:00
Adam Barth
969df19479 Wire up gesturetap in SkyShell
R=rafaelw@chromium.org

Review URL: https://codereview.chromium.org/997073003
2015-03-11 12:54:47 -07:00
Eric Seidel
a5ab3630e9 Remove the last bits of the Sky Inspector
Unclear what if any of this we will want in the Dart world.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/993203002
2015-03-11 10:13:25 -07:00
Adam Barth
397608c220 Make Sky's EditableText mostly work
This CL factors EditableString out of EditableText and implements more of the
InputConnection functions. As a result, EditableText now basically works.

This CL also paves the way to make EditableText stateless by using
EditableString as its state object. However, there's still a bit more work to
do to make that a reality (e.g., factoring out the cursor blink timer and the
connection to the keyboard).

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/995073002
2015-03-10 12:31:55 -07:00
Adam Barth
a01babc042 Implement a basic IME-aware input element
This CL introduces a new keyboard service that understands Android IME and
starts work on a Input component that interacts with this service to provide an
editing control.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/995613002
2015-03-09 16:19:56 -07:00
Eric Seidel
c8912dd14c Add support for scroll and fling gestures to SkyShell.
This is not complete gesture support by far, but it's a start.
MojoShell and Chrome use a C++ GestureDetector, this code attempts
to use the Android (Java) GestureDetector instead.

We probably should not be sending gesturetap until we've decided
it's not a scroll, etc, but this implementation does not go that far.

I had to fix a bug whereby we were assuming the InputEvent.time_stamp
was in TimeDelta's internal format, which was wrong.  When we get
time_stamp from Android its in ms since boot.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/969493002
2015-02-27 16:46:19 -08:00
Adam Barth
e8b988e226 Expose Android sensors to via Mojo services
This CL adds a sensor_service to sky/services and wires it into SkyShell
The plan is to eventually use this data to implement shake-to-refresh.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/962043002
2015-02-27 14:37:50 -08:00
Eric Seidel
dc0b57a2e5 Don't crash when we 404.
This makes debugging that case much easier.

R=abarth@chromium.org
BUG=

Review URL: https://codereview.chromium.org/958203002
2015-02-26 15:03:40 -08:00
Eric Seidel
3d09314b22 Make WebView::close not crash and start to fix navigation in SkyShell
However WebView::close() no longer crashes.  close() is never called
in MojoShell since mojo can't shutdown yet.

I tried closing the existing WebView and replacing it
but somehow that caused it to only draw red.  After a while
of looking at this with abarth we decided to just load into
the same WebView for now.

Eventually we should do something smarter where we start the
provisional load and only replace the webview once the new one is
ready, but that's a later CL.

R=abarth@chromium.org
BUG=

Review URL: https://codereview.chromium.org/952273003
2015-02-25 15:25:17 -08:00
Adam Barth
e55e0605e6 Share sky::PlatformImpl bettween sky_viewer and SkyShell
This should let SkyShell load images.

R=eseidel@chromium.org
BUG=https://github.com/domokit/mojo/issues/52

Review URL: https://codereview.chromium.org/959773005
2015-02-25 14:26:53 -08:00
Eric Seidel
be91f16293 Add support for VIEW intents to SkyShell.
This was landed on the skyshell branch and I forgot to pull it over:
https://codereview.chromium.org/946583003

TBR=abarth@chromium.org

Review URL: https://codereview.chromium.org/954893002
2015-02-24 17:39:36 -08:00
Adam Barth
8bdad9784d Port touch-demo.sky to Dart and make it work in SkyShell
We still don't quite handle multitouch correctly, but single touches work now.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/932283002
2015-02-18 16:57:32 -08:00
Adam Barth
cf2f7afb9f Add an implementation of url_loader.mojom using OkHttp
This CL is the beginnings of an implementation of url_loader.mojom using the
OkHttp library. OkHttp is a relatively simple HTTP client library for Android
that implements HTTP/1.1 and HTTP/2.0. We might want to use OkHttp to bootstrap
into a more full-featured network_service implementation based on //net.

R=jamesr@chromium.org

Review URL: https://codereview.chromium.org/930673002
2015-02-18 16:53:04 -08:00
Przemyslaw Pietrzkiewicz
6a04218fdb Delete sky/services/inspector/server.cc.
Sky Inspector is currently not working. This patch removes the Inspector
server, which is based on net/http_server, to unblock dropping /net in
Mojo.

BUG=456130
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/931873002
2015-02-17 18:18:31 +01:00
James Robinson
c0c8a41eb3 Remove [Client=] annotation from ServiceProvider
This removes the symmetrical nature of ServiceProvider and consistently
passes and uses a ServiceProvider + ServiceProvider& pair in places that
wish to bidirectionally expose services, such as the view manager.

The
view manager library now deals with InterfaceRequest<ServiceProvider>
and ServiceProviderPtr objects (i.e. c++ wrappers for handles) instead
of a concrete implementation of ServiceProvider to make it easier for
callers.

A number of places that were assuming a particular
ServiceProvider would always exist are updated to reflect the nullability
of the parameters in mojom and places that do not wish to ever look up
or provide services now pass nullptr instead of doomed pipe handles.

The JS application startup classes are reworked a bit to accomodate
exposing services on the third ConnectToApplication/AcceptConnection
parameter.

BUG=449432
R=abarth@chromium.org, sky@chromium.org

Review URL: https://codereview.chromium.org/858103002
2015-01-21 18:36:01 -08:00
Colin Blundell
545269f16e Make more services' public interfaces flexible wrt location in repo.
This CL introduces a new pattern for making services' public interfaces
flexible wrt location in the repo. A mojom target can now add import_dirs.
Each service target adds an import dir of the parent directory of
"<service>/public" and specifies its imports relative to that directory.
This CL covers the interfaces for geometry, gpu, input_events, and
native_viewport.

R=jamesr@chromium.org

Review URL: https://codereview.chromium.org/839903002
2015-01-15 00:25:51 +01:00
James Robinson
375d0f44e0 Remove client relationship between sky::Inspector{Front,Back}end
This removes the client relationship between the sky::InspectorFrontend
and sky::InspectorBackend mojo interfaces. Instead, the two are now
unrelated (in the mojom) and just happen to be often used together.
The inspector service provides the InspectorFrontend interface to
connecting applications and optimistically tries to connect to the
InspectorBackend interface of applications that connect, in case they
want to receive messages.  The front and back end interfaces are both
broadcast APIs, so no attempt is made to keep track of which binding
is which. If they did need to be correlated this could be easily
accomplished by allocating a new object to keep a
mojo::Binding<sky::InspectorFrontend> and the corresponding
sky::InspectorBackendPtr.

R=abarth@chromium.org, eseidel@chromium.org

Review URL: https://codereview.chromium.org/835463003
2015-01-09 14:50:39 -08:00
Ojan Vafai
0fcf250d03 Make reftests work for sky.
-Add a --testing flag to sky_viewer and cause it to paint into an
SkBitmap instead of a ganesh surface so we can get the pixels out.
-Add GetPixelsForTesting to layer.cc to actually grab out the pixels.
-Add a reftest and a mismatch reftest. They need a setTimeout after
the load event. Unclear why or what the right fix is. Maybe we should
give internals some way to force the paint? If we don't have the
setTimeout, we paint a white page (so we do a paint, but with no
content).
-Add a DisplayDelegate to Layer so that Viewer can decide whether
to use the real ganesh backend or the SkBitmap one without littering
the whole code-base with is_testing bools and logic.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/797063002
2014-12-12 16:45:49 -08:00
Colin Blundell
ac99b9896f Restructure public side of input_events service.
This CL goes from this:
  //mojo/services/public/interfaces/input_events

to this:
  //mojo/services/input_events/public/interfaces

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

TBR=beng

Review URL: https://codereview.chromium.org/788353002
2014-12-10 22:50:57 +01:00
James Robinson
f6527512b0 Simplify the thunk targets since we don't support apps as components
Since we don't support using the component build to produce mojo apps,
we can simplify the build targets in a few ways:

*) every mojo_native_application must depend on the c system thunks,
so just make that part of the template instead of requiring the dep
*) there's no such thing as depending on gles2 headers from a component,
so delete the forwarding group.

Most targets that want to use the gles2 headers in a mojo context
want to depend on an implementation through the thunks, so
//mojo/public/c/gles2 does just that. A smaller number of targets (such
as the implementation of the thunks) want to just depend on the headers
but not an impl, so they can depend on //mojo/public/c/gles2:headers.
The //mojo/public/gles target isn't that useful since the only thing we
expose is a set of C entry points.

We can probably also simplify the c system targets, but that's trickier
due to more extensive use from the chromium side.

BUG=438701
R=viettrungluu@chromium.org

Review URL: https://codereview.chromium.org/780733002
2014-12-03 16:25:09 -08:00
Hans Muller
22eee0e624 Mojo Example that demos the difference between providing and requesting an interface.
BUG=
R=viettrungluu@chromium.org, yzshen@chromium.org

Committed: 405bc1690e

Review URL: https://codereview.chromium.org/733563002
2014-11-21 09:54:34 -08:00
James Robinson
b77b562463 Use WeakBindingSet to manage inspector connections
The sky inspector service wants to implement a 1:N broadcast interface with whichever
frontends want to connect. This manages the pipes using a WeakBindingSet, which is a set of
bindings owned by the pipe combined with a list of weak pointers to those bindings allowing
sending messages to all connected clients without having to explicitly keep track of
which clients are connected at a particular point in time.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/711413005
2014-11-18 16:20:10 -08:00
Eric Seidel
38981ef393 Remove DEPS from sky
Also taught PRESUBMIT.py how to ignore DEPS for sky/
since gn check already covers everything we were using DEPS for.

R=abarth@chromium.org, jamesr@chromium.org

Review URL: https://codereview.chromium.org/737493002
2014-11-17 11:16:44 -08:00
Benjamin Lerman
e1311d656d Change mojo application name to {name}.mojo
Also remove obsolete reference to gyp files.

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

Review URL: https://codereview.chromium.org/713513002
2014-11-14 21:49:31 +01:00
Adam Barth
295f292722 Implement event sender service for testing
This service lets us send Mojo events during testing.

R=eseidel@chromium.org, esprehn@chromium.org

Review URL: https://codereview.chromium.org/716043002
2014-11-12 10:46:35 -08:00
Eric Seidel
a1bf7bae10 Make it possible to have multiple InspectorBackends
This will make it possible to connect a c++
inspector backend in addition to the JS one.

We lose the feature of running multiple inspector
servers in this patch, but we weren't using that feature
and could easily add it back if we plan to use it.

This patch has a *ton* of boilerplate code due
to crbug.com/431911, hopefully that will be fixed
soon and we can delete all the Impl nonsense.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/710043004
2014-11-11 10:29:21 -08:00
Eric Seidel
6e9d657373 Correct InspectorFronend to InspectorFrontend
TBR=abarth@chromium.org

Review URL: https://codereview.chromium.org/697203007
2014-11-06 15:49:06 -08:00
Eric Seidel
509999eccd Add a PRESUBMIT for gn check, currently only for //sky/*
Also fixed //sky/* to pass gn check again.

This makes all of our previous DEPS header checking
obsolete and those can be removed now.

R=jamesr@chromium.org

Review URL: https://codereview.chromium.org/697733002
2014-10-31 14:25:33 -07:00
Viet-Trung Luu
d707787423 mojom: Remove braces from module statements and make them come first.
So, instead of:

import "bar.mojom";
module foo {
  ...
}

You'll do:

module foo;
import "bar.mojom";
...

(Note that the grammar in the parser doesn't capture the ordering
constraint. It's hard to do so while keeping the grammar LR(1) AFAICT.
So instead we enforce the ordering "manually".)

Also delete mojo/spy/PRESUBMIT.py since it's broken. We'll delete
mojo/spy separately.

R=jamesr@chromium.org

Review URL: https://codereview.chromium.org/687793004
2014-10-31 12:59:52 -07:00
Adam Barth
b1f39b7c1b Move framework/inspector/server to services/inspector
Moving the inspector WebSocket proxy server out of the framework directory
simplifies the mappings for the HTTP servers.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/687673004
2014-10-28 15:38:23 -07:00