Commit fb1ddbbd authored by Mustaq Ahmed's avatar Mustaq Ahmed Committed by Commit Bot

Extension messaging: mark a method as test-only to prevent non-test use.

Change-Id: I6d8f3dce02ff4fb21e60d38c8c52d79a9ab156ba
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2078656Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
Commit-Queue: Mustaq Ahmed <mustaq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#745118}
parent 740cdbb5
...@@ -95,9 +95,6 @@ class NativeExtensionBindingsSystem { ...@@ -95,9 +95,6 @@ class NativeExtensionBindingsSystem {
void SendRequest(std::unique_ptr<APIRequestHandler::Request> request, void SendRequest(std::unique_ptr<APIRequestHandler::Request> request,
v8::Local<v8::Context> context); v8::Local<v8::Context> context);
// Returns the transient user activation state for the |context|.
bool GetUserActivationState(v8::Local<v8::Context> context);
// Called when listeners for a given event have changed, and forwards it along // Called when listeners for a given event have changed, and forwards it along
// to |send_event_listener_ipc_|. // to |send_event_listener_ipc_|.
void OnEventListenerChanged(const std::string& event_name, void OnEventListenerChanged(const std::string& event_name,
......
...@@ -21,8 +21,9 @@ void UserGesturesNativeHandler::AddRoutes() { ...@@ -21,8 +21,9 @@ void UserGesturesNativeHandler::AddRoutes() {
base::Unretained(this))); base::Unretained(this)));
RouteHandlerFunction( RouteHandlerFunction(
"RunWithUserGesture", "test", "RunWithUserGesture", "test",
base::BindRepeating(&UserGesturesNativeHandler::RunWithUserGesture, base::BindRepeating(
base::Unretained(this))); &UserGesturesNativeHandler::RunWithUserActivationForTest,
base::Unretained(this)));
} }
void UserGesturesNativeHandler::IsProcessingUserGesture( void UserGesturesNativeHandler::IsProcessingUserGesture(
...@@ -33,7 +34,7 @@ void UserGesturesNativeHandler::IsProcessingUserGesture( ...@@ -33,7 +34,7 @@ void UserGesturesNativeHandler::IsProcessingUserGesture(
context()->v8_context()))); context()->v8_context())));
} }
void UserGesturesNativeHandler::RunWithUserGesture( void UserGesturesNativeHandler::RunWithUserActivationForTest(
const v8::FunctionCallbackInfo<v8::Value>& args) { const v8::FunctionCallbackInfo<v8::Value>& args) {
// TODO(lazyboy): This won't work for Service Workers. Address this once we're // TODO(lazyboy): This won't work for Service Workers. Address this once we're
// certain that we need this for workers. // certain that we need this for workers.
......
...@@ -18,7 +18,8 @@ class UserGesturesNativeHandler : public ObjectBackedNativeHandler { ...@@ -18,7 +18,8 @@ class UserGesturesNativeHandler : public ObjectBackedNativeHandler {
private: private:
void IsProcessingUserGesture(const v8::FunctionCallbackInfo<v8::Value>& args); void IsProcessingUserGesture(const v8::FunctionCallbackInfo<v8::Value>& args);
void RunWithUserGesture(const v8::FunctionCallbackInfo<v8::Value>& args); void RunWithUserActivationForTest(
const v8::FunctionCallbackInfo<v8::Value>& args);
}; };
} // namespace extensions } // namespace extensions
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment