125 Commits

Author SHA1 Message Date
Adam Barth
3187dd13e2 Update to mojo 891577b0517de5aeca538d99669787c6dc72412a 2016-03-23 09:36:02 -07:00
Adam Barth
fc5ddc3058 Skip char key events
It's confusing to send two key press events. Instead, just send the
lower-level, non-char event.

The real fix will be to define a sensible key event protocol for Mozart, but
this patch unblocks people who are experimenting at higher layers of the stack.
2016-03-22 12:42:10 -07:00
Adam Barth
56bca69d7a Revert "Update to mojo 891577b0517de5aeca538d99669787c6dc72412a"
This reverts commit 7bfce5cb2644c64f172e64708b0b246db3567154.
This reverts commit a550e7e3958a9910946acc4e37f1fd0ed4ccd17c.
2016-03-21 17:17:50 -07:00
Adam Barth
a550e7e395 Update use of Mojo APIs 2016-03-21 16:52:01 -07:00
Jason Simmons
370db6cda3 Provide Mojo services for passing application-specific messages between the host and Flutter 2016-03-21 11:25:00 -07:00
Adam Barth
d8ed73e0a9 Wire up raw keyboard events in Mozart 2016-03-18 14:13:12 -07:00
Adam Barth
944b2eeca9 Move Keyboard and RawKeyboard to view services
These services are relative to the current view, which means they should come
in through the view services.
2016-03-18 12:37:30 -07:00
Adam Barth
678d5f9bac Cleanup MojoServices in dart:ui
This patch cleans up the way we expose Mojo services into Dart. It also adds a
service provider for "view services," which will evetually contain the raw
keyboard service.
2016-03-18 10:52:13 -07:00
Adam Barth
410aac589b Flutter apps in Mozart should have reasonable Uri.base
Previously this value was the temp directory that we used to store the FLX
bundle. Now it's the URL given to us by MojoShell.
2016-03-18 09:53:44 -07:00
Chinmay Garde
46070d433e Make the iOS shell use the public Flutter framework API.
Also cleans up the messages when errors occur in both modes. I have also made the API a lot simpler and moved more of the extraneous stuff out of public. Only FlutterViewController and the Dart project configuration are publically available.
2016-03-17 16:44:25 -07:00
Chinmay Garde
e09819e544 Fix Android builds. Accessing traces is now possible from observatory. 2016-03-17 11:24:52 -07:00
Jason Simmons
a3201f2023 Move SkyApplication initialization into SkyMain
This allows Flutter embedders to set up Flutter from their own application
class instead of using or subclassing SkyApplication
2016-03-16 10:28:40 -07:00
Jason Simmons
e2e7e4c79a Make the engine private to the Sky package and expose the relevant public methods on PlatformViewAndroid 2016-03-14 16:37:58 -07:00
Jason Simmons
722d712b7e Expose some public APIs for use by Flutter embedders outside the sky shell package
Also add a PlatformViewAndroid constructor required to support inflating
a Flutter view from an XML layout
2016-03-11 14:43:35 -08:00
Chinmay Garde
d0839ab662 Fix issue caught by Clang analyzer in the Flutter iOS framework 2016-03-10 17:20:46 -08:00
Chinmay Garde
02547a3d47 iOS: Rename ObjC files to follow Google style guide 2016-03-10 12:23:59 -08:00
Chinmay Garde
d1376fc93c Allow PlatformMacMain to be called multiple times
It is called each time the embedder initializes a Flutter view controller. The Mac shell (which does not have a view controller), calls it before NSApplicationMain.

Common items like the base::AtExitManager and the platform message loop are stored in `EmbedderState`
2016-03-09 17:49:17 -08:00
Chinmay Garde
274f98ef0d If a custom ICU data file path is specified, attempt loading from that instead of loading from the default path. 2016-03-09 11:27:52 -08:00
Chinmay Garde
a6464d0298 Allow PlatformMacMain to be called mutliple times by third party flutter embedders
If we control the embedder, we call it just once and have it wrap UIApplicationMain.
2016-03-08 17:12:18 -08:00
Chinmay Garde
a021befd19 Prepare a framework providing an embeddable Flutter view controller 2016-03-08 16:42:07 -08:00
Chinmay Garde
9dfa087e92 iOS: Export symbols for public API from the framework dylib 2016-03-08 12:34:24 -08:00
Chinmay Garde
8ec0463dc5 iOS: Cleanup and move guts of the embedder into FlutterViewController.
* Remove engine code from SkySurface into the controller.
* The public API exposed by Flutter.framework for third-party embedders is present ios/public.
* Public view controller API uses idiomatic Objective-C and is subclassable by consumers.
* Paves way for moving the embedder into a framework.
2016-03-07 17:23:45 -08:00
Todd Volkert
6a1ad20ce9 Wire up locale notifications to ios.
Fixes #2282
2016-03-07 14:37:10 -08:00
Chinmay Garde
273cc22184 Remove unused assets used for the defunct GN build of the iOS runner 2016-03-04 13:57:41 -08:00
Adam Barth
95b5d5dfa8 Update uses of Mojo to new interfaces 2016-03-02 14:14:55 -08:00
Chinmay Garde
8b89ad7dce Merge pull request #2435 from chinmaygarde/master
Allow specification of the FLX bundle (containing no Dart snapshot) outside the iOS/Mac application bundle.
2016-02-29 13:17:25 -08:00
Chinmay Garde
f9281a1edf Allow specification of the FLX bundle (containing no Dart snapshot) outside the iOS/Mac application bundle.
Allows launching of apps without having any Xcodebuild step in the simulator.
2016-02-29 13:16:01 -08:00
Matt Perry
34fb968705 Remove unused UpdateService. 2016-02-29 15:11:33 -05:00
Adam Barth
cf4c62ca1d Remove unneeded symbol from main_ios.mm
We don't appear to need this hack anymore.
2016-02-24 20:33:57 -08:00
Adam Barth
09e87f5865 Enable background compilation by default
We've been enabling it in the flutter tool for a while. This patch enables by
default in general.
2016-02-24 14:55:58 -08:00
Adam Barth
24eb9b3c19 Flutter.mojo should support multiple views
Each view gets its own Dart isolate. Unfortunately, the ShellPtr is a unique
resource, which means we need to proxy an implementation of Shell to each view.
In the future, we should probably switch dart to expect an ApplicationConnector
rather than a Shell.
2016-02-18 16:22:39 -08:00
Adam Barth
8111a77f73 Remove ServiceRegistry
We don't need this anymore now that we have Mozart.
2016-02-18 16:09:58 -08:00
Adam Barth
9e1e1fba54 Fix Android build 2016-02-13 00:09:32 -08:00
Adam Barth
b09cd543bd Add an off-by-default flag for background compilation 2016-02-12 16:01:18 -08:00
Jason Simmons
f4542c9152 Use Engine::RunFromBundle and the ZipAssetBundle on all platforms 2016-02-12 11:50:00 -08:00
Adam Barth
ab14d642fb Merge pull request #2386 from abarth/improve_mojo
Polish Mojo platform implementation
2016-02-11 14:31:00 -08:00
Adam Barth
d3dbc1cda4 Polish Mojo platform implementation
* Use Node::Combinator::PRUNE, which stops the Mozart launcher from showing red
  when we're loading child views. Instead of blocking the whole app, we'll now
  just prune away the children that aren't ready. Eventually we'll want
  to let authors control these operations.

* Grab the service registry in AcceptConnection rather than CreateView. The
  CreateView comes from the Mozart launcher, which isn't where we want to get
  the service registry. Now we get the service registry from the first app to
  connect, which isn't right either but at least works while we sort out what
  we really want.
2016-02-11 12:43:37 -08:00
Chinmay Garde
b8c6a97d81 Add error logging when a dynamic service fails to load
This happens once per service
2016-02-10 16:03:39 -08:00
Jason Simmons
ae517c2fee Add a way to override the snapshot when running an FLX bundle 2016-02-09 10:08:26 -08:00
Hixie
920e411493 Accessibility fixes
- Correctly enable accessibility on startup if it's already enabled.
- Avoid using deprecated APIs.
- Map FORWARD/BACKWARD scrolling actions to up/down even when left/right
  is also possible.
- Clear the accessibility focus when removing a focused semantics node.
- Unregister listeners when view goes away.
- Call setWillNotDraw(false) if accessibility is enabled.
- Clean the handling of hover events.
- Work around an Android bug where the system focus rect isn't drawn
  the first time.
2016-02-08 10:35:40 -08:00
Chinmay Garde
59781e9315 Merge pull request #2358 from chinmaygarde/master
Add a dynamic services target with a variant for the embedder and dylib each
2016-02-08 10:12:51 -08:00
Chinmay Garde
fcc9e95f3c Add a dynamic services target with a variant for the embedder and dylib each
* The embedder depends on dynamic:embedder
* The dylib depends on dynamic:dylib
* The embedder calls OnLoad and OnUnload callbacks that setup and teardown the dylib environment
* The dylib contains a thin library that services OnLoad, OnUnload and OnInvoke so that vendors dont have to do it themselves (and potentially mess it up)
* The vendor only has to implement the `FlutterServicePerform` method that takes a fully scoped handle
* This patch is a WIP till we get a stable Flutter ABI. The stuff in mojo/public is *NOT* stable
2016-02-08 10:11:09 -08:00
Hixie
d0e17e679a Track whether accessibility is enabled.
If we send accessibility events when accessibility is disabled, we crash.
2016-02-05 10:05:57 -08:00
Ian Hickson
380d5353cb Merge pull request #2353 from Hixie/actions
Make AccessibilityNodeInfos interactive.
2016-02-05 07:47:34 -08:00
Hixie
707ff9b4e2 Implement hover touch exploration mode on Android. 2016-02-04 16:56:07 -08:00
Chinmay Garde
800de4b122 Service vendors no longer specify the service entry point
Instead, the entry point is well known. The service name is passed as an argument to the service.
2016-02-04 16:55:17 -08:00
Hixie
0fa8524288 Android accessibility focus support
This lets you focus and unfocus a node.

Still doesn't seem to be enough to actually have the node exposed in
TalkBack. We probably need hover for that (that's next).

(Also fixes a leak for when a subtree has been disconnected; previously
we were only forgetting the top node of the subtree, not the
descendants. Thanks @krisgiesing for catching that.)
2016-02-04 15:53:17 -08:00
Hixie
17806fdb76 Tell Android when the accessibility tree changes
Hard to say if this actually works. We'll find out once we've filled
this out enough that you can walk the tree in Android's Talkback UI.
2016-02-04 14:53:22 -08:00
Hixie
cb789edc94 Make AccessibilityNodeInfos interactive.
This exposes the actions on AccessibilityNodeInfo nodes.
It also tries to make the code that handles reloads more correct.
2016-02-04 14:53:22 -08:00
Hixie
adbb587ab1 Flutter<->Android accessibility bridge
This is another step towards enabling accessibility for Flutter on
Android. It exposes the semantics tree to Android's accessibility API
when accessibility is enabled.

It does not yet:
 - allow one to actually interact with the application via the
   accessibility API
 - expose the accessibility tree to touch exploration
 - implement the accessibility focus API

However, you can see the tree if you run uiautomatorviewer. It is there,
and it matches the UI. At least in Stocks. I didn't test anything else.
2016-02-04 09:15:07 -08:00