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

Unified Diff: ppapi/cpp/instance.cc

Issue 6538028: A proposal for an initial postMessage interface. This will allow JavaScript ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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: ppapi/cpp/instance.cc
===================================================================
--- ppapi/cpp/instance.cc (revision 77426)
+++ ppapi/cpp/instance.cc (working copy)
@@ -61,6 +61,10 @@
return false;
}
+void Instance::HandleMessage(const Var& /*message_data*/) {
+ return;
+}
+
Var Instance::GetInstanceObject() {
return Var();
}
@@ -115,6 +119,12 @@
Var::OutException(exception).get()));
}
+void Instance::PostMessage(const Var& message) {
+ if (!has_interface<PPB_Instance>())
+ return;
+ get_interface<PPB_Instance>()->PostMessage(pp_instance(), message.pp_var());
+}
+
void Instance::AddPerInstanceObject(const std::string& interface_name,
void* object) {
// Ensure we're not trying to register more than one object per interface

Powered by Google App Engine
This is Rietveld 408576698