25 Commits

Author SHA1 Message Date
Adam Barth
7ca2e4fb10 Improve drawer performance
- Instead of using a ColorFilter or an Opacity widget to colorize the Icons,
   add a ColorFilter parameter it the image classes. This avoids needing to
   call saveLayer for each DrawerItem.
 - Ask Android for unbuffered input events to avoid bad synchronization with
   vsync.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1236043004 .
2015-07-15 11:07:53 -07:00
Eric Seidel
b4aa27685c Fix Asteroids game to paint again and give it an icon.
I also fixed dependencies on Activiy and Keyboard etc
which were incorrectly included only in SkyDemo despite
being depended on by the Sky Framework.

R=abarth@chromium.org, abarth@google.com, viktork@google.com

Review URL: https://codereview.chromium.org/1225103009 .
2015-07-10 13:42:03 -07:00
Eric Seidel
6f0c2d0983 Teach SkyShell.apk to stop posting frames when not visible
This listens to both surface destruction as well as activity
pause/unpause.

R=abarth@chromium.org, abarth@google.com

Review URL: https://codereview.chromium.org/1230073002 .
2015-07-10 10:26:54 -07:00
Adam Barth
566110a8f8 Stop leaking temp directories in SkyShell
At startup, we make a list of all the temp directories that already exist and
then nuke them on a background thread after a five second delay. The five
second delay isn't particularly satisfying, but I think it's wortwhile to get
this work off the critical path of startup.

R=eseidel@chromium.org, eseidel@google.com

Review URL: https://codereview.chromium.org/1228083003 .
2015-07-09 09:57:41 -07:00
Adam Barth
427f162519 mv //sky/services/intents //sky/services/activity
This interface is growing to expose many activity-related functions, more than
just intents.

R=eseidel@chromium.org, eseidel@google.com

Review URL: https://codereview.chromium.org/1223053002 .
2015-07-08 13:37:22 -07:00
Collin Jackson
ed92b54f18 Back button should be able to close apps (issue 155)
R=abarth@chromium.org, abarth@google.com

Review URL: https://codereview.chromium.org/1213623008.
2015-07-06 18:01:04 -07:00
Adam Barth
d94e1d6255 Move home.dart into example/demo_launcher
This CL makes home.dart less of a special snowflake and instead makes it a peer
to the other Sky examples. As a result, we can add a sky.yaml file and embed
the thumbnail assets it needs into demo_launcher.skyx.

R=eseidel@chromium.org, eseidel@google.com

Review URL: https://codereview.chromium.org/1215703010.
2015-07-06 14:49:03 -07:00
Adam Barth
8031ab6bd7 Add padding values to View.idl
Rather than hardcoding the size and presence of the notification area in Dart,
we now expose padding values on the view. These values are set to non-zero
values when there are UI elements that overlap the view. We currently respect
only the top padding, but this CL paves the way to respect padding in other
directions.

We still hardcode the size of the notification area in Java. A future CL will
retrieve this value from the Android framework.

Fixes #257

R=ianh@google.com

Review URL: https://codereview.chromium.org/1220353002.
2015-07-06 10:56:02 -07:00
Benjamin Lerman
7600714a6f Do not use android specific API in mojo/java.
R=abarth@chromium.org, eseidel@chromium.org

Review URL: https://codereview.chromium.org/1217573005.
2015-07-06 14:56:14 +02:00
Adam Barth
b4b5b8e638 Make it possible to load Sky demos from local bundles
This CL teaches SkyDemo how to load Sky applications from local bundles. It
also teaches home.dart how to request a load from a bundle.

TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1213203008.
2015-07-02 16:43:09 -07:00
Adam Barth
25fc061387 SkyDemo should use explicit intents
This CL switches SkyDemo over to using explicit intents for deciding which Sky
apps to run. This change lets us get rid of the hacky "sky" URI scheme.
Instead, we use normal URLs but we require the sender of the intent to be
explicit in directing the VIEW intent to us.

TBR=eseidel@google.com

Review URL: https://codereview.chromium.org/1221123003.
2015-07-02 15:41:45 -07:00
Adam Barth
9ab6d395f3 Teach Stocks.apk how to load a skyx bundle
This CL teaches Stocks.apk how to start from a skyx bundle name |app.skyx| in
the APK's asset collection.

Stocks.apk still actually starts from |snapshot_blob.bin| because we can't yet
produce skyx files as part of the build process.

TBR=eseidel@google.com

Review URL: https://codereview.chromium.org/1221033006.
2015-07-02 13:09:57 -07:00
Adam Barth
ae892ea9c8 Switch SkyShell to its own ResourceExtractor
This CL prepares us to have more interesting resources than base's
ResourceExtractor understands.

TBR=eseidel@google.com

Review URL: https://codereview.chromium.org/1221153002.
2015-07-02 11:24:57 -07:00
Adam Barth
2c6908f279 Rename ViewportObserver to SkyEngine
The term ViewportObserver doesn't mean anything. This interface has evolved to
control the engine. This new name reflects that.

TBR=eseidel@google.com

Review URL: https://codereview.chromium.org/1222663003.
2015-07-02 09:56:24 -07:00
Eric Seidel
834fb17258 Add a sky media service to make it possible to play a sound.
I didn't exactly follow the android API, but pretty close.

Also started a java/common implementation for things like
DataPipeUtils. I only needed the ability to copy from a data
pipe to a file, so that's the only function we have so far.

Fixes https://github.com/domokit/mojo/issues/270

R=abarth@chromium.org, abarth@google.com

Review URL: https://codereview.chromium.org/1211913005.
2015-07-01 12:29:40 -07:00
Adam Barth
0bc960761a Add MineDigger.apk that works offline
This CL builds an APK for MineDigger that works offline. We use |sky_packager|
to snapshot the Dart code, which we then extract from the APK during startup.
If we succeed in extracting a snapshot, we load it by default.

TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1211253004.
2015-06-26 23:18:13 -07:00
Adam Barth
1a1ef489ee Make it possible to run Sky apps offline
This CL makes it possible to run Sky apps offline by introducing new
DartLibraryProvider subclasses, specifically one that can load directly from
the file system. A future CL will expand this functionality to work with asset
bundles as well.

Currently, the only platform that uses this functionality is Linux, which can
now load a simple Sky app without even loading a network stack. Making this
work on other platforms is work for future CLs.

TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1203143004.
2015-06-25 13:59:22 -07:00
Adam Barth
c8e5668ddb Refactor SkyShell to allow multiple SkyViews
This CL separates the view-specific state from the process-global state. The
view-specific state now lives on Instance rather than Shell.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1187503003.
2015-06-12 13:29:53 -07:00
Adam Barth
2795216f6a Wire up Android back button in SkyShell
The back button now triggers an event of type |back|.

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

Review URL: https://codereview.chromium.org/1176373004.
2015-06-11 14:33:01 -07:00
Viet-Trung Luu
3c2e575fac Update from https://crrev.com/333737
* Cherrypick crrev.com/333293 (freetype -> freetype-android).
* Update mojo/go/go.py to use android-16 (NDK API level 16), which is
  4.1 (first Jelly Bean). Chromium dropped support for 14.
* TODO (separately): also update tools/go/upload.py and upload new
  binaries?
* Roll android_tools (to match Chromium).
* Small fixes to match //base changes: base::ObserverList, TraceConfig,
  ThreadTicks, etc.
* Restore build/ls.py (and add it to the list of files to not roll).
* Remove the dependency on third_party/instrumented_libraries.
* Add "enable_topchrome_md = false" to build/config/ui.gni.
* Add build/config/ui.gni to files_not_to_roll in
  update_from_chromium.py. (We should probably get rid of the use_glib
  variable/argument, and others as well.)
* Remove mojo/tools/roll/{roll_network_service.py,
  roll_network_service_patches/network_service.patch}. These are for
  rolling from Chromium, whereas we now have/use monet.
* Roll buildtools (to match Chromium).
* Modify sanitizer gn/gni files to make it work (patch included).
  (Maybe the patch even works -- I haven't checked.)

TBR=rockot@chromium.org,jamesr@chromium.org,rogulenko@google.com

Review URL: https://codereview.chromium.org/1180693002.
2015-06-11 10:01:25 -07:00
Adam Barth
6cbea9ce7e Stop SkyShell from crashing on startup
R=chinmaygarde@google.com

Review URL: https://codereview.chromium.org/1178773002.
2015-06-10 17:17:39 -07:00
Chinmay Garde
c230cc0adb sky/shell updates for Android and iOS
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1169983005.
2015-06-10 16:19:49 -07:00
Eric Seidel
a816e9fc5d Fix Sky not to crash when clicking the Home button.
Fixes https://github.com/domokit/mojo/issues/212

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1173153002.
2015-06-10 13:20:41 -07:00
Eric Seidel
0cbb319590 Stop leaking the TracingController's BroadcastReciever
https://github.com/domokit/sky_sdk/issues/23

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1150263003
2015-06-05 14:09:30 -07:00
Adam Barth
67b59fadb9 Make android directory for Android-specific bits of SkyShell
This CL prepares us to create an iOS version of SkyShell by moving the
Android-specific bits into an android directory.

R=chinmaygarde@google.com

Review URL: https://codereview.chromium.org/1139873004
2015-05-19 09:41:44 -07:00