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

Side by Side Diff: remoting/client/plugin/chromoting_instance.h

Issue 7466008: Reland http://codereview.chromium.org/7452002/ again (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 {
32 class InputEvent;
33 class Module; 33 class Module;
34 } // namespace pp 34 } // namespace pp
35 35
36 namespace remoting { 36 namespace remoting {
37 37
38 namespace protocol { 38 namespace protocol {
39 class ConnectionToHost; 39 class ConnectionToHost;
40 } // namespace protocol 40 } // namespace protocol
41 41
42 class ChromotingClient; 42 class ChromotingClient;
(...skipping 14 matching lines...) Expand all
57 class ChromotingInstance : public pp::InstancePrivate { 57 class ChromotingInstance : public pp::InstancePrivate {
58 public: 58 public:
59 // The mimetype for which this plugin is registered. 59 // The mimetype for which this plugin is registered.
60 static const char *kMimeType; 60 static const char *kMimeType;
61 61
62 explicit ChromotingInstance(PP_Instance instance); 62 explicit ChromotingInstance(PP_Instance instance);
63 virtual ~ChromotingInstance(); 63 virtual ~ChromotingInstance();
64 64
65 virtual bool Init(uint32_t argc, const char* argn[], const char* argv[]); 65 virtual bool Init(uint32_t argc, const char* argn[], const char* argv[]);
66 virtual void Connect(const ClientConfig& config); 66 virtual void Connect(const ClientConfig& config);
67 virtual bool HandleInputEvent(const PP_InputEvent& event); 67 virtual bool HandleInputEvent(const pp::InputEvent& event);
68 virtual void Disconnect(); 68 virtual void Disconnect();
69 virtual pp::Var GetInstanceObject(); 69 virtual pp::Var GetInstanceObject();
70 70
71 // pp::Instance interface. 71 // pp::Instance interface.
72 virtual void DidChangeView(const pp::Rect& position, const pp::Rect& clip) 72 virtual void DidChangeView(const pp::Rect& position, const pp::Rect& clip)
73 OVERRIDE; 73 OVERRIDE;
74 74
75 // Convenience wrapper to get the ChromotingScriptableObject. 75 // Convenience wrapper to get the ChromotingScriptableObject.
76 ChromotingScriptableObject* GetScriptableObject(); 76 ChromotingScriptableObject* GetScriptableObject();
77 77
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 // JavaScript interface to control this instance. 123 // JavaScript interface to control this instance.
124 // This wraps a ChromotingScriptableObject in a pp::Var. 124 // This wraps a ChromotingScriptableObject in a pp::Var.
125 pp::Var instance_object_; 125 pp::Var instance_object_;
126 126
127 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance); 127 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance);
128 }; 128 };
129 129
130 } // namespace remoting 130 } // namespace remoting
131 131
132 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ 132 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_
OLDNEW
« no previous file with comments | « ppapi/shared_impl/ppp_instance_combined.cc ('k') | remoting/client/plugin/chromoting_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698