Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Unified Diff: extensions/renderer/object_backed_native_handler.h

Issue 1854983002: [Extensions] Add more bindings access checks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: extensions/renderer/object_backed_native_handler.h
diff --git a/extensions/renderer/object_backed_native_handler.h b/extensions/renderer/object_backed_native_handler.h
index e3b63119b15aa4226f7735b667c6253933d74fee..8e804c3af459bd15c092d0c52797dd8bf78323b9 100644
--- a/extensions/renderer/object_backed_native_handler.h
+++ b/extensions/renderer/object_backed_native_handler.h
@@ -43,6 +43,11 @@ class ObjectBackedNativeHandler : public NativeHandler {
// Routed functions are destroyed along with the destruction of this class,
// and are never called back into, therefore it's safe for |handler_function|
// to bind to base::Unretained.
+ //
+ // |feature_name| corresponds to the api feature the native handler is used
+ // for. If the associated ScriptContext does not have access to that feature,
+ // the |handler_function| is not invoked.
+ // TODO(devlin): Deprecate the version that doesn't take a |feature_name|.
void RouteFunction(const std::string& name,
const HandlerFunction& handler_function);
void RouteFunction(const std::string& name,

Powered by Google App Engine
This is Rietveld 408576698