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

Unified Diff: chrome/renderer/extensions/app_window_custom_bindings.cc

Issue 10915085: Functions for accessing app window properties, and modifying AppWindow-specifics (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: stray event, js linter Created 8 years, 3 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: chrome/renderer/extensions/app_window_custom_bindings.cc
diff --git a/chrome/renderer/extensions/app_window_custom_bindings.cc b/chrome/renderer/extensions/app_window_custom_bindings.cc
index 65473b75021d042ad89236996efa62a7a84c0725..0815a6782e0477db92fc7723bbd742223dd561fd 100644
--- a/chrome/renderer/extensions/app_window_custom_bindings.cc
+++ b/chrome/renderer/extensions/app_window_custom_bindings.cc
@@ -53,6 +53,9 @@ AppWindowCustomBindings::AppWindowCustomBindings(Dispatcher* dispatcher)
RouteFunction("GetView",
base::Bind(&AppWindowCustomBindings::GetView,
base::Unretained(this)));
+ RouteFunction("GetCurrentRoutingID",
+ base::Bind(&AppWindowCustomBindings::GetCurrentRoutingID,
+ base::Unretained(this)));
}
namespace {
@@ -78,6 +81,14 @@ class FindViewByID : public content::RenderViewVisitor {
};
} // namespace
+v8::Handle<v8::Value> AppWindowCustomBindings::GetCurrentRoutingID(
+ const v8::Arguments& args) {
+ content::RenderView* render_view = GetCurrentRenderView();
+ if (!render_view)
+ return v8::Undefined();
+ return v8::Integer::New(render_view->GetRoutingID());
+}
+
v8::Handle<v8::Value> AppWindowCustomBindings::GetView(
const v8::Arguments& args) {
// TODO(jeremya): convert this to IDL nocompile to get validation, and turn

Powered by Google App Engine
This is Rietveld 408576698