1333 Commits

Author SHA1 Message Date
Amir Hardon
a7c1f0c283 Revert "Switch PlatformViewsController from Activity ref to Application ref. (#9193)" (flutter/engine#9211)
This reverts commit ff4e1cc751f66f87de0b9277a8aa1ffacc68809c.
2019-06-06 09:29:10 -07:00
Dan Field
1ccb372e5f Align fuchsia and non-fuchsia tracing (flutter/engine#9199) 2019-06-05 15:14:27 -07:00
Matt Carroll
ff4e1cc751 Switch PlatformViewsController from Activity ref to Application ref. (flutter/engine#9193) 2019-06-05 14:24:16 -07:00
Greg Spencer
722d833715 Add the key event source, vendorId, and productId from Android (flutter/engine#9186)
This adds the key event source from Android so that the framework can differentiate between keyboard events and game controller events. Also added vendor and product ids so that Flutter code can decide to do special processing based on the kind of device, if desired.
2019-06-04 16:46:23 -07:00
Ben Konyi
ec114a767e Allow for whitelisted flags to be passed to the Dart VM (flutter/engine#9148)
* Allow for whitelisted flags to be passed to the Dart VM

Fixed part of https://github.com/flutter/flutter/issues/32176
2019-06-04 14:51:29 -07:00
Amir Hardon
b90961e0a3 Fix platform views channel regression (flutter/engine#9185)
This regression was introduced in #7847.

The PlatformViewsChannel method call handler was always setting the result to `notImplemented` even after handling a result, this resulted in a "Reply already submitted" exception being thrown.
Note that the method channel code is swallowing this exception and logging an error, so we didn't crash instead we were logging an error(this is why the integration test didn't fail).

Filed https://github.com/flutter/flutter/issues/33863 to make sure tests fail when such exceptions are thrown.

This PR also cleans up an unused `NoSuchPlatformViewException` that was introduced in #7847.

https://github.com/flutter/flutter/issues/33866
2019-06-04 12:38:38 -07:00
Emmanuel Garcia
4fcb1520ed Revert change by mistake: extract resources (flutter/engine#9180) 2019-06-03 23:44:46 -07:00
Emmanuel Garcia
63f6cd7409 Use shared library when libapp.so is found (flutter/engine#9172) 2019-06-03 16:23:28 -07:00
Chris Yang
33d335d61e Do nothing if the params didn't change when compositing iOS platform views. (flutter/engine#8999) 2019-06-03 13:08:29 -07:00
Matt Carroll
4e26d76bd7 Extracted PlatformViewsChannel from PlatformViewsController. (flutter/engine#7847) 2019-06-03 11:04:33 -07:00
stuartmorgan
ea35ff30c0 Copy the macOS podspec during builds (flutter/engine#9158)
The podspec must be copied to the build output root, otherwise
--local-engine won't work in projects containing plugins.

Mirrors the iOS podspec copy rule.
2019-05-31 17:22:09 -07:00
Kevin Lindkvist
0a6a20fa55 Remove references to Fuchsia's ContextWriter (flutter/engine#9157) 2019-05-31 16:12:07 -07:00
Dan Field
7513edc9c2 Preserve safe area (flutter/engine#8848)
Preserve safe area on Window regardless of insets.
2019-05-31 09:24:38 -07:00
Jason Simmons
3e6486cb34 Always run the resource extractor in FlutterMain (flutter/engine#9149)
FlutterMain.findAppBundlePath is using the presence of the flutter_assets
directory as a signal that the app is initialized.  For consistency,
FlutterMain will run the resource extractor at startup and create
flutter_assets even if no resources need to be extracted.
2019-05-30 16:50:31 -07:00
Jason Simmons
833ee537b7 Suppress an unchecked cast warning in ShimPluginRegistry (flutter/engine#9145) 2019-05-30 13:10:03 -07:00
stuartmorgan
03ec25fb58 Fix type mismatches in C++ standard codec (flutter/engine#9112)
There were some implicit casts in the standard codec implementation that
didn't show up on Linux, but do on Windows.
2019-05-30 10:17:08 -07:00
Chris Yang
1020a201ca Dynamically add certain iOS AppDelegate methods. (flutter/engine#8843) 2019-05-30 09:06:49 -07:00
Matt Carroll
85c5d57ca8 New Plugin API PR5: Integrates plugin lifecycle control with FlutterFragment. (flutter/engine#9083) 2019-05-29 20:46:07 -07:00
Matt Carroll
f21942ddcc Implemented Log proxy that only logs in BuildConfig.DEBUG (#25391). (flutter/engine#9122) 2019-05-29 20:19:29 -07:00
Dan Field
542be40698 Reduce pipeline depth when GPU and Platform are same thread (flutter/engine#9132) 2019-05-29 19:45:02 -07:00
Kaushik Iska
780b9e0918 Change the virtual display size restriction to warning (flutter/engine#9110)
* Change the virtual display size restriction to warning

- Fixes: https://github.com/flutter/flutter/issues/33290

- This is so we don't block usecases where users show the platform
  view partially.

- https://github.com/flutter/flutter/issues/31990 should address this
  issue more broadly.

* Fix error message
2019-05-30 08:07:41 +05:30
Matt Carroll
99e54871e8 Add plugin shim to facilitate old plugins in new embedding (#33478). (flutter/engine#9120) 2019-05-29 18:39:15 -07:00
Matt Carroll
ad4706f1bc Added support for transparent FlutterActivitys (#32740). (flutter/engine#9115) 2019-05-29 18:34:53 -07:00
Chinmay Garde
cb00aac583 Allow specifying both Dart and non-Dart fixtures in engine unit-tests. (flutter/engine#9113)
* Allow specifying both Dart and non-Dart fixtures in engine unittests.

This fixes numerous issues in the way in which fixtures were managed
in the engine unit-tests.

* Instead of only being able to specify Dart fixtures, unit-tests may specify
  non-Dart fixtures as well. These are simply copied over to the fixtures
  directory known to the unit-test at runtime.
* An issue where numerous Dart files could be given to the kernel snapshotter
  has been addressed. It was anticipated that such a (legal) invocation to the
  kernel snapshotter would produce a snapshot with the contents of all the Dart
  files added to the root library. This is incorrect and the behavior in this
  case is undefined.
* Dart files referenced by the main Dart file are correctly tracked via a
  depfile.
* The snapshotter arguments have been cleaned up to get rid of unused
  arguments (`—strong`) and  the use of the VM product mode argument has been
  corrected to no longer depend on the Flutter product mode.
2019-05-28 19:11:47 -07:00
Kate Lovett
e94a3d9d2e Removing unused imports (flutter/engine#9108) 2019-05-28 15:16:33 -07:00
Mehmet Fidanboylu
d0b8eba0af Fix internal break since listing contents can return null (flutter/engine#9078) 2019-05-26 20:07:13 -07:00
stuartmorgan
f0c950fb04 Rename macOS FLEPlugin* to FlutterPlugin* (flutter/engine#9074)
As another step toward aligning the macOS plugin API with the iOS plugin
API, and with its final form, rename the plugin-related classes from
FLEPlugin* to FlutterPlugin*. This makes the names of the clasess the
same between iOS and macOS. Eventually they should actually merge, with
annotations/ifdefs for platform differences, but for now since the macOS
version uses the same method names and is simply a subset of the iOS
APIs (with one to-be-stabilized method that is macOS-specific) doing the
merge later won't be a breaking change.

Doing this now allows for building out plugin tooling and plugin
implementations on macOS without creating a growing body of code that
will experience a breaking change later.

See:
https://github.com/flutter/flutter/issues/31735
https://github.com/flutter/flutter/issues/32718
2019-05-25 20:45:00 -04:00
Chris Bracken
8150bff997 Apply minor cleanups to Android embedding (flutter/engine#9088)
Eliminate an unused import, add missing @Override annotations, and
eliminate an unused logger.
2019-05-25 15:45:14 -07:00
Chris Bracken
7cdc09e0b2 Removed outdated deprecation comments (flutter/engine#9087)
In breaking change flutter/engine#4487, a typo was fixed in our Android
APIs correcting RequestPermissionResult to RequestPermissionsResult
(note the 's' on Permissions) for consistency with the Android SDK.

Various tombstone comments were left to help guide developers in the
right direction. These comments were slated for removal in March of
2018; at over a year later, we can probably safely remove them.
2019-05-25 15:02:52 -07:00
Chris Bracken
f7fe97bf24 Delete BSDiff sources (flutter/engine#9086)
BSDiff is no longer used as of flutter/engine#8663. This removes the
unused Java import and sources.
2019-05-25 13:49:28 -07:00
Chris Bracken
21fd6fb32a Correct typos, adopt US spellings (flutter/engine#9081)
Corects a bnuch of typeos throughout teh engien codebsae. Also makes
a couple minor Commonwealth -> US spelling adjustments for consistency
with the rest of Flutter's codebase.

Made use of `misspell` tool:
https://github.com/client9/misspell
2019-05-25 13:14:46 -07:00
Matt Carroll
82b9848101 New Plugin API PR4: Adds Lifecycle support to the new plugin system. (flutter/engine#9049) 2019-05-24 19:28:49 -07:00
stuartmorgan
d1a7209236 Update macOS podspec version requirement (flutter/engine#9077)
The framework is currently built with a 10.12 deployment target, so the
podspec can be at 10.12 rather than 10.13.

The TODO is left because this is an update to the current reality rather
than a final decision about what should be supported.
2019-05-24 21:29:37 -04:00
Jason Simmons
4b5ce6b3ae Fix unchecked operation warnings in FlutterMain (flutter/engine#9073)
Also remove trailing whitespace on some lines
2019-05-23 15:30:08 -07:00
stuartmorgan
8eaa8b8a87 Add mouse button support to the macOS shell (flutter/engine#9054)
Uses the new embedding API support for device type and buttons to pass
appropriate mouse button events, allowing for right click, middle click,
etc.

Also fixes some edge cases where macOS event delivery violated Flutter
requirements by tracking more data about the mouse event stream and
adjusting the sent events as necessary.
2019-05-22 17:51:17 -04:00
stuartmorgan
cca1b1bf43 Add a podspec for FlutterMacOS.framework (flutter/engine#9062)
Based on the iOS Flutter.podspec. This will be used for plugin
management via CocoaPods, as on iOS.

Part of https://github.com/flutter/flutter/issues/32718
2019-05-22 17:48:41 -04:00
stuartmorgan
2b6a8b2d4c Expose pointer type and buttons in embedder.h (flutter/engine#9034)
Rather than hard-coding the type of incoming events to mouse, and
synthesizing a primary button press for kDown/kUp, expose device kind
and buttons in the API.

For backwards compatibility, if the type is not set, the old behavior is
used. If an embedder sets the type to mouse explicitly, however, they
must also set correct button information.

For the touch type, the API abstracts away the framework's internal
expectation that a button is set for touch down/move for simplicity.

Fixes flutter/flutter#32854
2019-05-22 11:30:32 -04:00
Matthew Dempsky
e59951fa15 Avoid unnecessary copying of vectors in AccessibilityBridge (flutter/engine#9033) 2019-05-21 12:39:11 -07:00
Matthew Dempsky
ca6d80857f Initialize next_pointer_flow_id_ to 0 (flutter/engine#9026)
This member variable was added to three classes in #7807, but only
initialized to 0 in one of them. Initialize to 0 in the other two.
2019-05-20 16:52:16 -07:00
stuartmorgan
7092aaf246 Fix horizontal scroll direction for macOS (flutter/engine#9022)
macOS uses negative values to represent scrolls to the right, while
Flutter expects the opposite, so flip X deltas.
2019-05-20 17:01:29 -04:00
stuartmorgan
1cf094e38b Macos systemnavigator pop (flutter/engine#9019)
Adds the flutter/platform channel to the macOS shell, and implements
SystemNavigator.pop.

Other methods from this channel will be implement in the future.

macOS part of flutter/flutter#30713
2019-05-20 16:15:58 -04:00
Amir Hardon
8ab4eb57a0 remove m prefix from fields in the Android PlatformViews code (flutter/engine#9020) 2019-05-20 12:38:23 -07:00
stuartmorgan
f0ab13a0bb Minor fixes/adjustments to the GLFW shell (flutter/engine#8990)
- Makes json_method_codec.cc compatible with the last stable RapidJSON release.
- Allows removing the GTK dependency with a compile flag.
- Fixes a missing break in a switch flagged by some toolchains.
2019-05-20 14:36:59 -04:00
Emmanuel Garcia
a2b0765104 Add mode to load AOT snapshots as a native lib (flutter/engine#8979) 2019-05-20 10:08:50 -07:00
Chris Bracken
963c943a12 Rename Fuchsia Dart and Flutter runners (flutter/engine#9003)
four_gate -> flutter_runner
dt_rush -> dart_runner
2019-05-17 17:04:40 -07:00
Adam Barth
e1c043fe58 [fuchsia] Update zx_clock_get callers (flutter/engine#8998)
Fuchsia is changing zx_clock_get to return a zx_status_t. This change
prepares us for that change.
2019-05-17 16:37:28 -07:00
Matt Carroll
443edceabb New Plugin API PR3: Introduces Service, BroadcastReceiver, and ContentProvider awareness, control surfaces, and plugin bindings. (flutter/engine#8962) 2019-05-17 14:25:05 -07:00
stuartmorgan
5c4c8d9f27 Enable hover by default for desktop shells (flutter/engine#8991)
Fixes flutter/flutter#32835
2019-05-16 20:12:03 -04:00
Dan Field
6037f82d66 add observatoryUrl property to FlutterEngine (flutter/engine#8987) 2019-05-16 13:14:34 -07:00
Matthew Dempsky
0bca459e28 Replace ararysize macro with fml::size function (flutter/engine#8975)
This is forward compatible with std::size and similar to how Chromium
removed use of the arraysize macro.
2019-05-15 12:43:47 -07:00