summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-20 17:47:50 +0000
committerwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-20 17:47:50 +0000
commit9090ad70285be342c89e4099eedd899ae736d5d1 (patch)
tree5ef33751a6582a7b6ebc4d2c02564ba7895fe3d4 /remoting
parent3ae445e87c76883a093adcd2ab64082210102820 (diff)
downloadchromium_src-9090ad70285be342c89e4099eedd899ae736d5d1.zip
chromium_src-9090ad70285be342c89e4099eedd899ae736d5d1.tar.gz
chromium_src-9090ad70285be342c89e4099eedd899ae736d5d1.tar.bz2
Temporarily move to private synchronous scriptable interfaces.
BUG=82353 TEST= Review URL: http://codereview.chromium.org/7185026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89682 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r--remoting/client/plugin/chromoting_instance.cc8
-rw-r--r--remoting/client/plugin/chromoting_instance.h4
-rw-r--r--remoting/client/plugin/chromoting_scriptable_object.cc19
-rw-r--r--remoting/remoting.gyp3
4 files changed, 19 insertions, 15 deletions
diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc
index 5a6b950..c961a6b 100644
--- a/remoting/client/plugin/chromoting_instance.cc
+++ b/remoting/client/plugin/chromoting_instance.cc
@@ -20,6 +20,8 @@
#include "ppapi/c/pp_input_event.h"
#include "ppapi/cpp/completion_callback.h"
#include "ppapi/cpp/rect.h"
+// TODO(wez): Remove this when crbug.com/86353 is complete.
+#include "ppapi/cpp/private/var_private.h"
#include "remoting/client/client_config.h"
#include "remoting/client/client_util.h"
#include "remoting/client/chromoting_client.h"
@@ -48,7 +50,7 @@ namespace remoting {
const char* ChromotingInstance::kMimeType = "pepper-application/x-chromoting";
ChromotingInstance::ChromotingInstance(PP_Instance pp_instance)
- : pp::Instance(pp_instance),
+ : pp::InstancePrivate(pp_instance),
initialized_(false),
logger_(this) {
}
@@ -227,7 +229,7 @@ bool ChromotingInstance::HandleInputEvent(const PP_InputEvent& event) {
}
ChromotingScriptableObject* ChromotingInstance::GetScriptableObject() {
- pp::Var object = GetInstanceObject();
+ pp::VarPrivate object = GetInstanceObject();
if (!object.is_undefined()) {
pp::deprecated::ScriptableObject* so = object.AsScriptableObject();
DCHECK(so != NULL);
@@ -282,7 +284,7 @@ pp::Var ChromotingInstance::GetInstanceObject() {
object->Init();
// The pp::Var takes ownership of object here.
- instance_object_ = pp::Var(this, object);
+ instance_object_ = pp::VarPrivate(this, object);
}
return instance_object_;
diff --git a/remoting/client/plugin/chromoting_instance.h b/remoting/client/plugin/chromoting_instance.h
index 3b55454..99be050 100644
--- a/remoting/client/plugin/chromoting_instance.h
+++ b/remoting/client/plugin/chromoting_instance.h
@@ -15,8 +15,8 @@
#include "ppapi/c/pp_instance.h"
#include "ppapi/c/pp_rect.h"
#include "ppapi/c/pp_resource.h"
-#include "ppapi/cpp/instance.h"
#include "ppapi/cpp/var.h"
+#include "ppapi/cpp/private/instance_private.h"
#include "remoting/client/client_context.h"
#include "remoting/client/plugin/chromoting_scriptable_object.h"
#include "remoting/client/plugin/pepper_client_logger.h"
@@ -54,7 +54,7 @@ namespace protocol {
class HostConnection;
} // namespace protocol
-class ChromotingInstance : public pp::Instance {
+class ChromotingInstance : public pp::InstancePrivate {
public:
// The mimetype for which this plugin is registered.
static const char *kMimeType;
diff --git a/remoting/client/plugin/chromoting_scriptable_object.cc b/remoting/client/plugin/chromoting_scriptable_object.cc
index c84b15f..565e03a 100644
--- a/remoting/client/plugin/chromoting_scriptable_object.cc
+++ b/remoting/client/plugin/chromoting_scriptable_object.cc
@@ -6,7 +6,8 @@
#include "base/logging.h"
#include "base/stringprintf.h"
-#include "ppapi/cpp/var.h"
+// TODO(wez): Remove this when crbug.com/86353 is complete.
+#include "ppapi/cpp/private/var_private.h"
#include "remoting/base/auth_token_util.h"
#include "remoting/client/client_config.h"
#include "remoting/client/chromoting_stats.h"
@@ -14,6 +15,7 @@
#include "remoting/client/plugin/pepper_xmpp_proxy.h"
using pp::Var;
+using pp::VarPrivate;
namespace remoting {
@@ -244,7 +246,7 @@ void ChromotingScriptableObject::SetConnectionInfo(ConnectionStatus status,
void ChromotingScriptableObject::LogDebugInfo(const std::string& info) {
Var exception;
- Var cb = GetProperty(Var(kDebugInfo), &exception);
+ VarPrivate cb = GetProperty(Var(kDebugInfo), &exception);
// Var() means call the object directly as a function rather than calling
// a method in the object.
@@ -285,7 +287,7 @@ void ChromotingScriptableObject::AddMethod(const std::string& name,
void ChromotingScriptableObject::SignalConnectionInfoChange() {
Var exception;
- Var cb = GetProperty(Var(kConnectionInfoUpdate), &exception);
+ VarPrivate cb = GetProperty(Var(kConnectionInfoUpdate), &exception);
// Var() means call the object directly as a function rather than calling
// a method in the object.
@@ -298,14 +300,11 @@ void ChromotingScriptableObject::SignalConnectionInfoChange() {
void ChromotingScriptableObject::SignalDesktopSizeChange() {
Var exception;
-
- // The JavaScript callback function is the 'callback' property on the
- // 'desktopSizeUpdate' object.
- Var cb = GetProperty(Var(kDesktopSizeUpdate), &exception);
+ VarPrivate cb = GetProperty(Var(kDesktopSizeUpdate), &exception);
// Var() means call the object directly as a function rather than calling
// a method in the object.
- cb.Call(Var(), 0, NULL, &exception);
+ cb.Call(Var(), &exception);
if (!exception.is_undefined()) {
LOG(WARNING) << "Exception when invoking JS callback"
@@ -315,7 +314,7 @@ void ChromotingScriptableObject::SignalDesktopSizeChange() {
void ChromotingScriptableObject::SignalLoginChallenge() {
Var exception;
- Var cb = GetProperty(Var(kLoginChallenge), &exception);
+ VarPrivate cb = GetProperty(Var(kLoginChallenge), &exception);
// Var() means call the object directly as a function rather than calling
// a method in the object.
@@ -331,7 +330,7 @@ void ChromotingScriptableObject::AttachXmppProxy(PepperXmppProxy* xmpp_proxy) {
void ChromotingScriptableObject::SendIq(const std::string& message_xml) {
Var exception;
- Var cb = GetProperty(Var(kSendIq), &exception);
+ VarPrivate cb = GetProperty(Var(kSendIq), &exception);
// Var() means call the object directly as a function rather than calling
// a method in the object.
diff --git a/remoting/remoting.gyp b/remoting/remoting.gyp
index cfac8f1..3a04c20 100644
--- a/remoting/remoting.gyp
+++ b/remoting/remoting.gyp
@@ -114,6 +114,9 @@
'type': 'static_library',
'defines': [
'HAVE_STDINT_H', # Required by on2_integer.h
+ # TODO(wez): See crbug.com/82606 and crbug.com/86353.
+ 'PPAPI_INSTANCE_REMOVE_SCRIPTING',
+ 'PPAPI_VAR_REMOVE_SCRIPTING',
],
'dependencies': [
'remoting_base',