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

Unified Diff: remoting/client/plugin/chromoting_instance.h

Issue 6359010: Add PepperViewProxy to protect PepperView and ChromotingInstance on shutdown (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: done Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: remoting/client/plugin/chromoting_instance.h
diff --git a/remoting/client/plugin/chromoting_instance.h b/remoting/client/plugin/chromoting_instance.h
index ead3b5625e3f4f7c29a1333ef2020b9263328a2f..94e4100cd63cb871b1a28075d6e975ed4c08a537 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_;
« no previous file with comments | « no previous file | remoting/client/plugin/chromoting_instance.cc » ('j') | remoting/protocol/jingle_connection_to_host.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698