diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-26 00:11:58 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-26 00:11:58 +0000 |
commit | 472e207c9b8d644cb286200f364b21cbeb54e0b3 (patch) | |
tree | c0e62070950d4721f0a279a25727c5113469ba52 /remoting/client/plugin/chromoting_instance.h | |
parent | 44d33b4816fa103086266bf77030e8bec2336a22 (diff) | |
download | chromium_src-472e207c9b8d644cb286200f364b21cbeb54e0b3.zip chromium_src-472e207c9b8d644cb286200f364b21cbeb54e0b3.tar.gz chromium_src-472e207c9b8d644cb286200f364b21cbeb54e0b3.tar.bz2 |
Add PepperViewProxy to protect PepperView and ChromotingInstance on shutdown
Adding a refcounted PepperViewProxy so that we can detach PepperView when
ChromotingInstance is destroyed. PepperViewProxy also performs the task of
thread delegation for PepperView so we can assume PepperView is used only on
pepper thread.
BUG=65696
TEST=None
Review URL: http://codereview.chromium.org/6359010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72568 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/client/plugin/chromoting_instance.h')
-rw-r--r-- | remoting/client/plugin/chromoting_instance.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/remoting/client/plugin/chromoting_instance.h b/remoting/client/plugin/chromoting_instance.h index ead3b56..94e4100 100644 --- a/remoting/client/plugin/chromoting_instance.h +++ b/remoting/client/plugin/chromoting_instance.h @@ -43,6 +43,7 @@ class ClientContext; class InputHandler; class JingleThread; class PepperView; +class PepperViewProxy; class RectangleUpdateDecoder; struct ClientConfig; @@ -85,6 +86,15 @@ class ChromotingInstance : public pp::Instance { ClientContext context_; scoped_ptr<protocol::ConnectionToHost> host_connection_; scoped_ptr<PepperView> view_; + + // PepperViewProxy is refcounted and used to interface between shromoting + // objects and PepperView and perform thread switching. It wraps around + // |view_| and receives method calls on chromoting threads. These method + // calls are then delegates on the pepper thread. During destruction of + // ChromotingInstance we need to detach PepperViewProxy from PepperView since + // both ChromotingInstance and PepperView are destroyed and there will be + // outstanding tasks on the pepper message loo. + scoped_refptr<PepperViewProxy> view_proxy_; scoped_ptr<RectangleUpdateDecoder> rectangle_decoder_; scoped_ptr<InputHandler> input_handler_; scoped_ptr<ChromotingClient> client_; |