summaryrefslogtreecommitdiffstats
path: root/remoting/client/plugin/chromoting_instance.h
diff options
context:
space:
mode:
authorgarykac@chromium.org <garykac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-08 17:51:47 +0000
committergarykac@chromium.org <garykac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-08 17:51:47 +0000
commit376dea2176504ad886c68110aff882a113807467 (patch)
tree3d835427a52ee536c72ae6fbe74124dec38c6a9c /remoting/client/plugin/chromoting_instance.h
parent02d08e07d137b394792d15b712d029455713b195 (diff)
downloadchromium_src-376dea2176504ad886c68110aff882a113807467.zip
chromium_src-376dea2176504ad886c68110aff882a113807467.tar.gz
chromium_src-376dea2176504ad886c68110aff882a113807467.tar.bz2
Hook up communication between Chromoting plugin and JS so that it can notify the JS UI of status changes.
Push SetState handling down ChromotingView so that UI changes are contained in the View. BUG=54855 TEST=chromoting unittests Review URL: http://codereview.chromium.org/3446020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61977 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/client/plugin/chromoting_instance.h')
-rw-r--r--remoting/client/plugin/chromoting_instance.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/remoting/client/plugin/chromoting_instance.h b/remoting/client/plugin/chromoting_instance.h
index 6c9d7c0..df1db9f 100644
--- a/remoting/client/plugin/chromoting_instance.h
+++ b/remoting/client/plugin/chromoting_instance.h
@@ -14,6 +14,7 @@
#include "base/scoped_ptr.h"
#include "remoting/client/client_context.h"
#include "remoting/client/host_connection.h"
+#include "remoting/client/plugin/chromoting_scriptable_object.h"
#include "third_party/ppapi/c/pp_instance.h"
#include "third_party/ppapi/c/pp_rect.h"
#include "third_party/ppapi/c/pp_resource.h"
@@ -52,11 +53,15 @@ class ChromotingInstance : public pp::Instance {
virtual bool Init(uint32_t argc, const char* argn[], const char* argv[]);
virtual void Connect(const ClientConfig& config);
virtual bool HandleInputEvent(const PP_InputEvent& event);
+ virtual void Disconnect();
virtual pp::Var GetInstanceObject();
virtual void ViewChanged(const pp::Rect& position, const pp::Rect& clip);
virtual bool CurrentlyOnPluginThread() const;
+ // Convenience wrapper to get the ChromotingScriptableObject.
+ ChromotingScriptableObject* GetScriptableObject();
+
private:
FRIEND_TEST_ALL_PREFIXES(ChromotingInstanceTest, TestCaseSetup);
@@ -74,7 +79,10 @@ class ChromotingInstance : public pp::Instance {
scoped_ptr<RectangleUpdateDecoder> rectangle_decoder_;
scoped_ptr<InputHandler> input_handler_;
scoped_ptr<ChromotingClient> client_;
- pp::Var instance_object_; // JavaScript interface to control this instance.
+
+ // JavaScript interface to control this instance.
+ // This wraps a ChromotingScriptableObject in a pp::Var.
+ pp::Var instance_object_;
DISALLOW_COPY_AND_ASSIGN(ChromotingInstance);
};