diff --git a/sky/services/platform/BUILD.gn b/sky/services/platform/BUILD.gn index efaedb79ae4..da7e4b42b86 100644 --- a/sky/services/platform/BUILD.gn +++ b/sky/services/platform/BUILD.gn @@ -11,7 +11,7 @@ mojom("interfaces") { "path_provider.mojom", "system_chrome.mojom", "system_sound.mojom", - "uri_launcher.mojom", + "url_launcher.mojom", ] } @@ -25,7 +25,7 @@ if (is_android) { "src/org/domokit/platform/PathProviderImpl.java", "src/org/domokit/platform/SystemChromeImpl.java", "src/org/domokit/platform/SystemSoundImpl.java", - "src/org/domokit/platform/UriLauncherImpl.java", + "src/org/domokit/platform/UrlLauncherImpl.java", ] deps = [ @@ -48,8 +48,8 @@ if (is_ios) { "ios/system_chrome_impl.mm", "ios/system_sound_impl.h", "ios/system_sound_impl.mm", - "ios/uri_launcher_impl.h", - "ios/uri_launcher_impl.mm", + "ios/url_launcher_impl.h", + "ios/url_launcher_impl.mm", ] deps = [ "//base:base", diff --git a/sky/services/platform/ios/uri_launcher_impl.h b/sky/services/platform/ios/url_launcher_impl.h similarity index 51% rename from sky/services/platform/ios/uri_launcher_impl.h rename to sky/services/platform/ios/url_launcher_impl.h index 22af93185f1..fcf7bdfc900 100644 --- a/sky/services/platform/ios/uri_launcher_impl.h +++ b/sky/services/platform/ios/url_launcher_impl.h @@ -2,32 +2,32 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SKY_SERVICES_PLATFORM_IOS_URI_LAUNCHER_IMPL_H_ -#define SKY_SERVICES_PLATFORM_IOS_URI_LAUNCHER_IMPL_H_ +#ifndef SKY_SERVICES_PLATFORM_IOS_URL_LAUNCHER_IMPL_H_ +#define SKY_SERVICES_PLATFORM_IOS_URL_LAUNCHER_IMPL_H_ #include "base/macros.h" #include "mojo/public/cpp/bindings/strong_binding.h" -#include "sky/services/platform/uri_launcher.mojom.h" +#include "sky/services/platform/url_launcher.mojom.h" namespace flutter { namespace platform { -class URILauncherImpl : public URILauncher { +class URLLauncherImpl : public URLLauncher { public: - explicit URILauncherImpl(mojo::InterfaceRequest request); + explicit URLLauncherImpl(mojo::InterfaceRequest request); - ~URILauncherImpl() override; + ~URLLauncherImpl() override; void Launch(const mojo::String& uriString, const LaunchCallback& callback) override; private: - mojo::StrongBinding binding_; + mojo::StrongBinding binding_; - DISALLOW_COPY_AND_ASSIGN(URILauncherImpl); + DISALLOW_COPY_AND_ASSIGN(URLLauncherImpl); }; } // namespace platform } // namespace flutter -#endif // SKY_SERVICES_PLATFORM_IOS_URI_LAUNCHER_IMPL_H_ +#endif // SKY_SERVICES_PLATFORM_IOS_URL_LAUNCHER_IMPL_H_ diff --git a/sky/services/platform/ios/uri_launcher_impl.mm b/sky/services/platform/ios/url_launcher_impl.mm similarity index 70% rename from sky/services/platform/ios/uri_launcher_impl.mm rename to sky/services/platform/ios/url_launcher_impl.mm index e8c1d433252..fca3b097ca8 100644 --- a/sky/services/platform/ios/uri_launcher_impl.mm +++ b/sky/services/platform/ios/url_launcher_impl.mm @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "sky/services/platform/ios/uri_launcher_impl.h" +#include "sky/services/platform/ios/url_launcher_impl.h" #include "base/mac/scoped_nsautorelease_pool.h" #include @@ -10,16 +10,16 @@ namespace flutter { namespace platform { -URILauncherImpl::URILauncherImpl(mojo::InterfaceRequest request) +URLLauncherImpl::URLLauncherImpl(mojo::InterfaceRequest request) : binding_(this, request.Pass()) {} -URILauncherImpl::~URILauncherImpl() {} +URLLauncherImpl::~URLLauncherImpl() {} -void URILauncherImpl::Launch(const mojo::String& uriString, +void URLLauncherImpl::Launch(const mojo::String& urlString, const LaunchCallback& callback) { base::mac::ScopedNSAutoreleasePool pool; - NSURL* url = [NSURL URLWithString:@(uriString.data())]; + NSURL* url = [NSURL URLWithString:@(urlString.data())]; UIApplication* application = [UIApplication sharedApplication]; diff --git a/sky/services/platform/src/org/domokit/platform/UriLauncherImpl.java b/sky/services/platform/src/org/domokit/platform/UrlLauncherImpl.java similarity index 83% rename from sky/services/platform/src/org/domokit/platform/UriLauncherImpl.java rename to sky/services/platform/src/org/domokit/platform/UrlLauncherImpl.java index a747e572200..f48ddf4e4b6 100644 --- a/sky/services/platform/src/org/domokit/platform/UriLauncherImpl.java +++ b/sky/services/platform/src/org/domokit/platform/UrlLauncherImpl.java @@ -10,15 +10,15 @@ import android.net.Uri; import org.chromium.mojo.system.MojoException; -import org.chromium.mojom.flutter.platform.UriLauncher; +import org.chromium.mojom.flutter.platform.UrlLauncher; /** - * Android implementation of UriLauncher. + * Android implementation of UrlLauncher. */ -public class UriLauncherImpl implements UriLauncher { +public class UrlLauncherImpl implements UrlLauncher { private final Activity mActivity; - public UriLauncherImpl(Activity activity) { + public UrlLauncherImpl(Activity activity) { mActivity = activity; } diff --git a/sky/services/platform/uri_launcher.mojom b/sky/services/platform/url_launcher.mojom similarity index 67% rename from sky/services/platform/uri_launcher.mojom rename to sky/services/platform/url_launcher.mojom index 09b646dcf7e..9d4e0d11ca6 100644 --- a/sky/services/platform/uri_launcher.mojom +++ b/sky/services/platform/url_launcher.mojom @@ -5,17 +5,17 @@ [DartPackage="sky_services"] module flutter.platform; -/// Allows applications to delegate responsbility of handling certain URIs to +/// Allows applications to delegate responsbility of handling certain URLs to /// the underlying platform. -[ServiceName="flutter::platform::URILauncher"] -interface URILauncher { - /// Parse the specified URI string and delegate handling of the same to the +[ServiceName="flutter::platform::URLLauncher"] +interface URLLauncher { + /// Parse the specified URL string and delegate handling of the same to the /// underlying platform. /// /// Return Value: - /// boolean indicating if the intent to handle the URI was successfully + /// boolean indicating if the intent to handle the URL was successfully /// conveyed to the to underlying platform and the platform could - /// successfully handle the same. The platform is responsible for URI + /// successfully handle the same. The platform is responsible for URL /// parsing. - Launch(string uriString) => (bool success); + Launch(string urlString) => (bool success); }; diff --git a/sky/shell/platform/android/io/flutter/view/FlutterMain.java b/sky/shell/platform/android/io/flutter/view/FlutterMain.java index 909e204e88e..8e5bdc08cfa 100644 --- a/sky/shell/platform/android/io/flutter/view/FlutterMain.java +++ b/sky/shell/platform/android/io/flutter/view/FlutterMain.java @@ -38,7 +38,7 @@ import org.chromium.mojom.flutter.platform.HapticFeedback; import org.chromium.mojom.flutter.platform.PathProvider; import org.chromium.mojom.flutter.platform.SystemChrome; import org.chromium.mojom.flutter.platform.SystemSound; -import org.chromium.mojom.flutter.platform.UriLauncher; +import org.chromium.mojom.flutter.platform.UrlLauncher; import org.chromium.mojom.media.MediaService; import org.chromium.mojom.mojo.NetworkService; import org.chromium.mojom.sensors.SensorService; @@ -51,7 +51,7 @@ import org.domokit.platform.HapticFeedbackImpl; import org.domokit.platform.PathProviderImpl; import org.domokit.platform.SystemChromeImpl; import org.domokit.platform.SystemSoundImpl; -import org.domokit.platform.UriLauncherImpl; +import org.domokit.platform.UrlLauncherImpl; import org.domokit.vsync.VSyncProviderImpl; /** @@ -213,10 +213,10 @@ public class FlutterMain { } }); - registry.register(UriLauncher.MANAGER.getName(), new ServiceFactory() { + registry.register(UrlLauncher.MANAGER.getName(), new ServiceFactory() { @Override public Binding connectToService(Context context, Core core, MessagePipeHandle pipe) { - return UriLauncher.MANAGER.bind(new UriLauncherImpl((android.app.Activity) context), pipe); + return UrlLauncher.MANAGER.bind(new UrlLauncherImpl((android.app.Activity) context), pipe); } }); } diff --git a/sky/shell/platform/mac/platform_service_provider.cc b/sky/shell/platform/mac/platform_service_provider.cc index 5ae4a879681..0a516016d49 100644 --- a/sky/shell/platform/mac/platform_service_provider.cc +++ b/sky/shell/platform/mac/platform_service_provider.cc @@ -13,7 +13,7 @@ #include "sky/services/platform/ios/path_provider_impl.h" #include "sky/services/platform/ios/system_chrome_impl.h" #include "sky/services/platform/ios/system_sound_impl.h" -#include "sky/services/platform/ios/uri_launcher_impl.h" +#include "sky/services/platform/ios/url_launcher_impl.h" #include "sky/services/vsync/ios/vsync_provider_impl.h" #endif // TARGET_OS_IPHONE @@ -87,9 +87,9 @@ void PlatformServiceProvider::ConnectToService( client_handle.Pass())); return; } - if (service_name == flutter::platform::URILauncher::Name_) { - new flutter::platform::URILauncherImpl( - mojo::InterfaceRequest( + if (service_name == flutter::platform::URLLauncher::Name_) { + new flutter::platform::URLLauncherImpl( + mojo::InterfaceRequest( client_handle.Pass())); return; }