From d37caa23b0fff3b45f1b4b9186c212864b1cce89 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Wed, 19 Oct 2016 22:12:19 -0700 Subject: [PATCH] Remove editing.mojom (flutter/engine#3152) Clients have been migrated to the TextInputPlugin. --- .../flutter/shell/platform/android/BUILD.gn | 2 -- .../android/io/flutter/view/FlutterView.java | 19 +------------------ .../shell/platform/darwin/common/BUILD.gn | 1 - .../darwin/common/view_service_provider.cc | 7 ------- .../darwin/common/view_service_provider.h | 4 ---- .../shell/platform/darwin/ios/BUILD.gn | 1 - .../flutter_services/lib/editing.dart | 6 ------ .../flutter_services/lib/input_event.dart | 6 ------ .../sky/packages/sky_services/BUILD.gn | 1 - 9 files changed, 1 insertion(+), 46 deletions(-) delete mode 100644 engine/src/flutter/sky/packages/flutter_services/lib/editing.dart delete mode 100644 engine/src/flutter/sky/packages/flutter_services/lib/input_event.dart diff --git a/engine/src/flutter/shell/platform/android/BUILD.gn b/engine/src/flutter/shell/platform/android/BUILD.gn index 5222052d7b..be515f5755 100644 --- a/engine/src/flutter/shell/platform/android/BUILD.gn +++ b/engine/src/flutter/shell/platform/android/BUILD.gn @@ -84,8 +84,6 @@ android_library("java") { deps = [ "//base:base_java", - "//flutter/services/editing:editing_lib", - "//flutter/services/editing:interfaces_java", "//flutter/services/engine:interfaces_java", "//flutter/services/platform:interfaces_java", "//flutter/services/vsync:vsync_lib", diff --git a/engine/src/flutter/shell/platform/android/io/flutter/view/FlutterView.java b/engine/src/flutter/shell/platform/android/io/flutter/view/FlutterView.java index f4cb331a82..c478d09c51 100644 --- a/engine/src/flutter/shell/platform/android/io/flutter/view/FlutterView.java +++ b/engine/src/flutter/shell/platform/android/io/flutter/view/FlutterView.java @@ -42,7 +42,6 @@ import org.chromium.mojo.system.MessagePipeHandle; import org.chromium.mojo.system.MojoException; import org.chromium.mojo.system.Pair; import org.chromium.mojo.system.impl.CoreImpl; -import org.chromium.mojom.editing.Keyboard; import org.chromium.mojom.flutter.platform.ApplicationMessages; import org.chromium.mojom.mojo.ServiceProvider; import org.chromium.mojom.sky.AppLifecycleState; @@ -63,9 +62,6 @@ import io.flutter.plugin.common.ActivityLifecycleListener; import io.flutter.plugin.editing.TextInputPlugin; import io.flutter.plugin.platform.PlatformPlugin; -import org.domokit.editing.KeyboardImpl; -import org.domokit.editing.KeyboardViewState; - /** * An Android view containing a Flutter app. */ @@ -90,7 +86,6 @@ public class FlutterView extends SurfaceView private HashMap mAsyncOnMessageListeners; private final SurfaceHolder.Callback mSurfaceCallback; private final ViewportMetrics mMetrics; - private final KeyboardViewState mKeyboardState; private final AccessibilityManager mAccessibilityManager; private BroadcastReceiver discoveryReceiver; private List mActivityLifecycleListeners; @@ -139,8 +134,6 @@ public class FlutterView extends SurfaceView }; getHolder().addCallback(mSurfaceCallback); - mKeyboardState = new KeyboardViewState(this); - Core core = CoreImpl.getInstance(); mPlatformServiceProvider = new ServiceProviderImpl(core, this, ServiceRegistry.SHARED); @@ -273,10 +266,7 @@ public class FlutterView extends SurfaceView @Override public InputConnection onCreateInputConnection(EditorInfo outAttrs) { - InputConnection connection = mKeyboardState.createInputConnection(outAttrs); - if (connection == null) - connection = mTextInputPlugin.createInputConnection(this, outAttrs); - return connection; + return mTextInputPlugin.createInputConnection(this, outAttrs); } // Must match the PointerChange enum in pointer.dart. @@ -463,13 +453,6 @@ public class FlutterView extends SurfaceView } private void configureLocalServices(ServiceRegistry registry) { - registry.register(Keyboard.MANAGER.getName(), new ServiceFactory() { - @Override - public Binding connectToService(FlutterView view, Core core, MessagePipeHandle pipe) { - return Keyboard.MANAGER.bind(new KeyboardImpl(view.getContext(), mKeyboardState), pipe); - } - }); - registry.register(ApplicationMessages.MANAGER.getName(), new ServiceFactory() { @Override public Binding connectToService(FlutterView view, Core core, MessagePipeHandle pipe) { diff --git a/engine/src/flutter/shell/platform/darwin/common/BUILD.gn b/engine/src/flutter/shell/platform/darwin/common/BUILD.gn index 60e15bc5d6..5b661dafae 100644 --- a/engine/src/flutter/shell/platform/darwin/common/BUILD.gn +++ b/engine/src/flutter/shell/platform/darwin/common/BUILD.gn @@ -21,7 +21,6 @@ source_set("common") { "//base:i18n", "//dart/runtime:libdart", "//flutter/runtime", - "//flutter/services/editing", "//flutter/services/engine:interfaces", "//flutter/services/platform", "//flutter/services/vsync", diff --git a/engine/src/flutter/shell/platform/darwin/common/view_service_provider.cc b/engine/src/flutter/shell/platform/darwin/common/view_service_provider.cc index b982dc0e95..9ab38f8ee1 100644 --- a/engine/src/flutter/shell/platform/darwin/common/view_service_provider.cc +++ b/engine/src/flutter/shell/platform/darwin/common/view_service_provider.cc @@ -25,13 +25,6 @@ void ViewServiceProvider::ConnectToService( std::move(client_handle))); return; } -#if TARGET_OS_IPHONE - if (service_name == ::editing::Keyboard::Name_) { - new sky::services::editing::KeyboardImpl( - mojo::InterfaceRequest<::editing::Keyboard>(std::move(client_handle))); - return; - } -#endif } } // namespace shell diff --git a/engine/src/flutter/shell/platform/darwin/common/view_service_provider.h b/engine/src/flutter/shell/platform/darwin/common/view_service_provider.h index 357b3c5fda..ea1f318aac 100644 --- a/engine/src/flutter/shell/platform/darwin/common/view_service_provider.h +++ b/engine/src/flutter/shell/platform/darwin/common/view_service_provider.h @@ -13,10 +13,6 @@ #include "mojo/public/cpp/bindings/strong_binding.h" #include "mojo/public/interfaces/application/service_provider.mojom.h" -#if TARGET_OS_IPHONE -#include "flutter/services/editing/ios/keyboard_impl.h" -#endif - namespace shell { typedef std::function