diff options
Diffstat (limited to 'chromium/android_webview/common')
3 files changed, 0 insertions, 103 deletions
diff --git a/chromium/android_webview/common/BUILD.gn b/chromium/android_webview/common/BUILD.gn index 9d3b358a7a7..79d6b32c19a 100644 --- a/chromium/android_webview/common/BUILD.gn +++ b/chromium/android_webview/common/BUILD.gn @@ -5,32 +5,6 @@ import("//build/config/android/rules.gni") import("//mojo/public/tools/bindings/mojom.gni") -mojom("common_mojom") { - sources = [ - "aw_origin_matcher.mojom", - "js_java_interaction/interfaces.mojom", - ] - - public_deps = [ - "//mojo/public/mojom/base", - "//services/network/public/mojom:mojom", - "//third_party/blink/public/mojom:mojom_core", - ] - - cpp_typemaps = [ - { - types = [ - { - mojom = "android_webview.mojom.AwOriginMatcher" - cpp = "::android_webview::AwOriginMatcher" - }, - ] - traits_headers = - [ "//android_webview/common/aw_origin_matcher_mojom_traits.h" ] - }, - ] -} - source_set("common") { sources = [ "android_webview_message_generator.cc", @@ -44,8 +18,6 @@ source_set("common") { "aw_hit_test_data.h", "aw_media_drm_bridge_client.cc", "aw_media_drm_bridge_client.h", - "aw_origin_matcher.cc", - "aw_origin_matcher.h", "aw_paths.cc", "aw_paths.h", "aw_resource.cc", diff --git a/chromium/android_webview/common/aw_origin_matcher.mojom b/chromium/android_webview/common/aw_origin_matcher.mojom deleted file mode 100644 index 453aa6693e0..00000000000 --- a/chromium/android_webview/common/aw_origin_matcher.mojom +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2020 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -module android_webview.mojom; - -// This corresponds to the string representation of AwOriginMatcher. -struct AwOriginMatcher { - array<string> rules; -};
\ No newline at end of file diff --git a/chromium/android_webview/common/js_java_interaction/interfaces.mojom b/chromium/android_webview/common/js_java_interaction/interfaces.mojom deleted file mode 100644 index 1434bbafa44..00000000000 --- a/chromium/android_webview/common/js_java_interaction/interfaces.mojom +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2019 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -module android_webview.mojom; - -import "android_webview/common/aw_origin_matcher.mojom"; -import "mojo/public/mojom/base/string16.mojom"; -import "third_party/blink/public/mojom/messaging/message_port_descriptor.mojom"; - -// JsObject struct represents a JavaScript object we will inject in the main -// JavaScript world of a frame. |js_object_name| will be used as the name -// of the JavaScript object. We will inject the object if the frame's origin -// matches |origin_matcher|. |js_to_java_messaging| will be used for that -// JavaScript object to send message back to browser (hence Java) side. -struct JsObject { - mojo_base.mojom.String16 js_object_name; - pending_associated_remote<JsToJavaMessaging> js_to_java_messaging; - android_webview.mojom.AwOriginMatcher origin_matcher; -}; - -// DocumentStartJavascript struct contains the JavaScript snippet |script| and -// the corresponding |origin_matcher|. We will run the script if the frame's -// origin matches any rules in the |origin_matcher|. -struct DocumentStartJavascript { - int32 script_id; - mojo_base.mojom.String16 script; - android_webview.mojom.AwOriginMatcher origin_matcher; -}; - -// For JavaScript postMessage() API, implemented by browser. -interface JsToJavaMessaging { - // Called from renderer, browser receives |message| and possible |ports|, - // The |message| is an opaque type and the contents are defined by the client - // of this API. - PostMessage(mojo_base.mojom.String16 message, - array<blink.mojom.MessagePortDescriptor> ports); - - // When there is a new JavaToJsMessaging created in renderer, we need to send - // it to browser, so browser could send message back to Js. - SetJavaToJsMessaging( - pending_associated_remote<JavaToJsMessaging> java_to_js_messaging); -}; - -// For Java to reply back to injected JavaScript object. Implemented by -// renderer. -interface JavaToJsMessaging { - // Called from browser, to send message from Java to JavaScript. - OnPostMessage(mojo_base.mojom.String16 message); -}; - -// For browser to configure renderer, implemented by renderer. -interface JsJavaConfigurator { - // Called from browser, to tell renderer that if we need to inject - // JavaScript objects to the frame based on the |js_objects| array. - SetJsObjects(array<android_webview.mojom.JsObject> js_objects); - - // Called from browser, to add a script for a frame to run at document start - // stage. The script will run only if the frame's origin matches any of the - // allowed_origin_rules. - AddDocumentStartScript(android_webview.mojom.DocumentStartJavascript script); - - // Called from browser, to remove the script by the given script_id. - RemoveDocumentStartScript(int32 script_id); -}; |