Rename uri_launcher.mojom to url_launcher.mojom. (#2773)

This commit is contained in:
Chinmay Garde 2016-06-22 17:15:51 -07:00 committed by GitHub
parent 161496dff3
commit bb9865538b
7 changed files with 37 additions and 37 deletions

View File

@ -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",

View File

@ -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<URILauncher> request);
explicit URLLauncherImpl(mojo::InterfaceRequest<URLLauncher> request);
~URILauncherImpl() override;
~URLLauncherImpl() override;
void Launch(const mojo::String& uriString,
const LaunchCallback& callback) override;
private:
mojo::StrongBinding<URILauncher> binding_;
mojo::StrongBinding<URLLauncher> 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_

View File

@ -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 <UIKit/UIKit.h>
@ -10,16 +10,16 @@
namespace flutter {
namespace platform {
URILauncherImpl::URILauncherImpl(mojo::InterfaceRequest<URILauncher> request)
URLLauncherImpl::URLLauncherImpl(mojo::InterfaceRequest<URLLauncher> 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];

View File

@ -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;
}

View File

@ -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);
};

View File

@ -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);
}
});
}

View File

@ -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<flutter::platform::URILauncher>(
if (service_name == flutter::platform::URLLauncher::Name_) {
new flutter::platform::URLLauncherImpl(
mojo::InterfaceRequest<flutter::platform::URLLauncher>(
client_handle.Pass()));
return;
}