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

Unified Diff: ppapi/cpp/instance.cc

Issue 7038044: First step to remove scripting from PPP_Instance and PPB_Instance. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 9 years, 7 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
« no previous file with comments | « ppapi/cpp/instance.h ('k') | ppapi/cpp/module.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/instance.cc
diff --git a/ppapi/cpp/instance.cc b/ppapi/cpp/instance.cc
index 12cfc021d2c0a9212a236cf438eca1c48c3ab4c0..985e9b729cc3192aad6c02c009a9d3ffa743d053 100644
--- a/ppapi/cpp/instance.cc
+++ b/ppapi/cpp/instance.cc
@@ -70,14 +70,11 @@ void Instance::HandleMessage(const Var& /*message*/) {
return;
}
-Var Instance::GetInstanceObject() {
- return Var();
-}
-
Var Instance::GetSelectedText(bool /* html */) {
return Var();
}
+#ifndef PPAPI_INSTANCE_REMOVE_SCRIPTING
Var Instance::GetWindowObject() {
if (!has_interface<PPB_Instance>())
return Var();
@@ -93,6 +90,21 @@ Var Instance::GetOwnerElementObject() {
pp_instance()));
}
+Var Instance::ExecuteScript(const Var& script, Var* exception) {
+ if (!has_interface<PPB_Instance>())
+ return Var();
+ return Var(Var::PassRef(),
+ get_interface<PPB_Instance>()->ExecuteScript(
+ pp_instance(),
+ script.pp_var(),
+ Var::OutException(exception).get()));
+}
+
+Var Instance::GetInstanceObject() {
+ return Var();
+}
+#endif
+
bool Instance::BindGraphics(const Graphics2D& graphics) {
if (!has_interface<PPB_Instance>())
return false;
@@ -114,16 +126,6 @@ bool Instance::IsFullFrame() {
pp_instance()));
}
-Var Instance::ExecuteScript(const Var& script, Var* exception) {
- if (!has_interface<PPB_Instance>())
- return Var();
- return Var(Var::PassRef(),
- get_interface<PPB_Instance>()->ExecuteScript(
- pp_instance(),
- script.pp_var(),
- Var::OutException(exception).get()));
-}
-
void Instance::PostMessage(const Var& message) {
if (!has_interface<PPB_Messaging>())
return;
« no previous file with comments | « ppapi/cpp/instance.h ('k') | ppapi/cpp/module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698