diff options
author | dmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-24 18:37:04 +0000 |
---|---|---|
committer | dmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-24 18:37:04 +0000 |
commit | 95cfdc807c92568d9c9d99ba0c3de5a53c02dee1 (patch) | |
tree | ffcf6381969e520eeb9bddea98d19ce3541fb9ed /ppapi/cpp/instance.cc | |
parent | be21444e83285f8087371a50dc3c45c956a75605 (diff) | |
download | chromium_src-95cfdc807c92568d9c9d99ba0c3de5a53c02dee1.zip chromium_src-95cfdc807c92568d9c9d99ba0c3de5a53c02dee1.tar.gz chromium_src-95cfdc807c92568d9c9d99ba0c3de5a53c02dee1.tar.bz2 |
Remove scripting from PPP_Instance and PPB_Instance (behind precompiler flag).
Create 0.5 versions of the instance interfaces that are the default only if PPAPI_INSTANCE_REMOVE_SCRIPTING is defined. This is so [hopefully] plugins can opt in to the new version and migrate to InstancePrivate/VarPrivate more easily.
BUG=82606
TEST=PPAPI tests
Review URL: http://codereview.chromium.org/7038044
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86458 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/cpp/instance.cc')
-rw-r--r-- | ppapi/cpp/instance.cc | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/ppapi/cpp/instance.cc b/ppapi/cpp/instance.cc index 12cfc02..985e9b7 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; |