Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // TODO(ajwong): We need to come up with a better description of the | 5 // TODO(ajwong): We need to come up with a better description of the |
| 6 // responsibilities for each thread. | 6 // responsibilities for each thread. |
| 7 | 7 |
| 8 #ifndef REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ | 8 #ifndef REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ |
| 9 #define REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ | 9 #define REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ |
| 10 | 10 |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "ppapi/c/pp_instance.h" | 15 #include "ppapi/c/pp_instance.h" |
| 16 #include "ppapi/c/pp_rect.h" | 16 #include "ppapi/c/pp_rect.h" |
| 17 #include "ppapi/c/pp_resource.h" | 17 #include "ppapi/c/pp_resource.h" |
| 18 #include "ppapi/cpp/var.h" | 18 #include "ppapi/cpp/var.h" |
| 19 #include "ppapi/cpp/private/instance_private.h" | 19 #include "ppapi/cpp/private/instance_private.h" |
| 20 #include "remoting/client/client_context.h" | 20 #include "remoting/client/client_context.h" |
| 21 #include "remoting/client/plugin/chromoting_scriptable_object.h" | 21 #include "remoting/client/plugin/chromoting_scriptable_object.h" |
| 22 #include "remoting/client/plugin/pepper_client_logger.h" | 22 #include "remoting/client/plugin/pepper_client_logger.h" |
| 23 #include "remoting/protocol/connection_to_host.h" | 23 #include "remoting/protocol/connection_to_host.h" |
| 24 | 24 |
| 25 class MessageLoop; | 25 class MessageLoop; |
| 26 struct PP_InputEvent; | |
| 27 | 26 |
| 28 namespace base { | 27 namespace base { |
| 29 class Thread; | 28 class Thread; |
| 30 } // namespace base | 29 } // namespace base |
| 31 | 30 |
| 32 namespace pp { | 31 namespace pp { |
| 33 class Module; | 32 class Module; |
|
Wez
2011/07/20 00:58:35
Need to forward-define InputEvent here, too.
garykac
2011/07/20 18:55:28
Done.
| |
| 34 } // namespace pp | 33 } // namespace pp |
| 35 | 34 |
| 36 namespace remoting { | 35 namespace remoting { |
| 37 | 36 |
| 38 namespace protocol { | 37 namespace protocol { |
| 39 class ConnectionToHost; | 38 class ConnectionToHost; |
| 40 } // namespace protocol | 39 } // namespace protocol |
| 41 | 40 |
| 42 class ChromotingClient; | 41 class ChromotingClient; |
| 43 class ChromotingStats; | 42 class ChromotingStats; |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 57 class ChromotingInstance : public pp::InstancePrivate { | 56 class ChromotingInstance : public pp::InstancePrivate { |
| 58 public: | 57 public: |
| 59 // The mimetype for which this plugin is registered. | 58 // The mimetype for which this plugin is registered. |
| 60 static const char *kMimeType; | 59 static const char *kMimeType; |
| 61 | 60 |
| 62 explicit ChromotingInstance(PP_Instance instance); | 61 explicit ChromotingInstance(PP_Instance instance); |
| 63 virtual ~ChromotingInstance(); | 62 virtual ~ChromotingInstance(); |
| 64 | 63 |
| 65 virtual bool Init(uint32_t argc, const char* argn[], const char* argv[]); | 64 virtual bool Init(uint32_t argc, const char* argn[], const char* argv[]); |
| 66 virtual void Connect(const ClientConfig& config); | 65 virtual void Connect(const ClientConfig& config); |
| 67 virtual bool HandleInputEvent(const PP_InputEvent& event); | 66 virtual bool HandleInputEvent(const pp::InputEvent& event); |
| 68 virtual void Disconnect(); | 67 virtual void Disconnect(); |
| 69 virtual pp::Var GetInstanceObject(); | 68 virtual pp::Var GetInstanceObject(); |
| 70 | 69 |
| 71 // pp::Instance interface. | 70 // pp::Instance interface. |
| 72 virtual void DidChangeView(const pp::Rect& position, const pp::Rect& clip) | 71 virtual void DidChangeView(const pp::Rect& position, const pp::Rect& clip) |
| 73 OVERRIDE; | 72 OVERRIDE; |
| 74 | 73 |
| 75 // Convenience wrapper to get the ChromotingScriptableObject. | 74 // Convenience wrapper to get the ChromotingScriptableObject. |
| 76 ChromotingScriptableObject* GetScriptableObject(); | 75 ChromotingScriptableObject* GetScriptableObject(); |
| 77 | 76 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 123 // JavaScript interface to control this instance. | 122 // JavaScript interface to control this instance. |
| 124 // This wraps a ChromotingScriptableObject in a pp::Var. | 123 // This wraps a ChromotingScriptableObject in a pp::Var. |
| 125 pp::Var instance_object_; | 124 pp::Var instance_object_; |
| 126 | 125 |
| 127 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance); | 126 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance); |
| 128 }; | 127 }; |
| 129 | 128 |
| 130 } // namespace remoting | 129 } // namespace remoting |
| 131 | 130 |
| 132 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ | 131 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ |
| OLD | NEW |