| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 } // namespace pp | 32 } // namespace pp |
| 33 | 33 |
| 34 namespace remoting { | 34 namespace remoting { |
| 35 | 35 |
| 36 class ChromotingClient; | 36 class ChromotingClient; |
| 37 class ClientContext; | 37 class ClientContext; |
| 38 class HostConnection; | 38 class HostConnection; |
| 39 class InputHandler; | 39 class InputHandler; |
| 40 class JingleThread; | 40 class JingleThread; |
| 41 class PepperView; | 41 class PepperView; |
| 42 class RectangleUpdateDecoder; |
| 42 | 43 |
| 43 class ChromotingInstance : public pp::Instance { | 44 class ChromotingInstance : public pp::Instance { |
| 44 public: | 45 public: |
| 45 // The mimetype for which this plugin is registered. | 46 // The mimetype for which this plugin is registered. |
| 46 static const char *kMimeType; | 47 static const char *kMimeType; |
| 47 | 48 |
| 48 explicit ChromotingInstance(PP_Instance instance); | 49 explicit ChromotingInstance(PP_Instance instance); |
| 49 virtual ~ChromotingInstance(); | 50 virtual ~ChromotingInstance(); |
| 50 | 51 |
| 51 virtual bool Init(uint32_t argc, const char* argn[], const char* argv[]); | 52 virtual bool Init(uint32_t argc, const char* argn[], const char* argv[]); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 63 // init to figure out which thread we're on. This should only be used to | 64 // init to figure out which thread we're on. This should only be used to |
| 64 // sanity check which thread we're executing on. Do not post task here! | 65 // sanity check which thread we're executing on. Do not post task here! |
| 65 // Instead, use PPB_Core:CallOnMainThread() in the pepper api. | 66 // Instead, use PPB_Core:CallOnMainThread() in the pepper api. |
| 66 // | 67 // |
| 67 // TODO(ajwong): Think if there is a better way to safeguard this. | 68 // TODO(ajwong): Think if there is a better way to safeguard this. |
| 68 MessageLoop* pepper_main_loop_dont_post_to_me_; | 69 MessageLoop* pepper_main_loop_dont_post_to_me_; |
| 69 | 70 |
| 70 ClientContext context_; | 71 ClientContext context_; |
| 71 scoped_ptr<HostConnection> host_connection_; | 72 scoped_ptr<HostConnection> host_connection_; |
| 72 scoped_ptr<PepperView> view_; | 73 scoped_ptr<PepperView> view_; |
| 74 scoped_ptr<RectangleUpdateDecoder> rectangle_decoder_; |
| 73 scoped_ptr<InputHandler> input_handler_; | 75 scoped_ptr<InputHandler> input_handler_; |
| 74 scoped_ptr<ChromotingClient> client_; | 76 scoped_ptr<ChromotingClient> client_; |
| 75 pp::Var instance_object_; // JavaScript interface to control this instance. | 77 pp::Var instance_object_; // JavaScript interface to control this instance. |
| 76 | 78 |
| 77 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance); | 79 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance); |
| 78 }; | 80 }; |
| 79 | 81 |
| 80 } // namespace remoting | 82 } // namespace remoting |
| 81 | 83 |
| 82 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ | 84 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ |
| OLD | NEW |