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

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

Issue 10440107: Replace ScopedThreadProxy with MessageLoopProxy & WeakPtrs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use correct TaskRunner reference, and copy instance reference in lock. Created 8 years, 6 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
« no previous file with comments | « remoting/client/chromoting_client.cc ('k') | remoting/client/plugin/chromoting_instance.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "ppapi/c/pp_instance.h" 16 #include "ppapi/c/pp_instance.h"
17 #include "ppapi/c/pp_rect.h" 17 #include "ppapi/c/pp_rect.h"
18 #include "ppapi/c/pp_resource.h" 18 #include "ppapi/c/pp_resource.h"
19 #include "ppapi/cpp/var.h" 19 #include "ppapi/cpp/var.h"
20 20
21 // Windows defines 'PostMessage', so we have to undef it before we 21 // Windows defines 'PostMessage', so we have to undef it before we
22 // include instance_private.h 22 // include instance_private.h
23 #if defined(PostMessage) 23 #if defined(PostMessage)
24 #undef PostMessage 24 #undef PostMessage
25 #endif 25 #endif
26 26
27 #include "ppapi/cpp/instance.h" 27 #include "ppapi/cpp/instance.h"
28 #include "remoting/base/scoped_thread_proxy.h"
29 #include "remoting/client/client_context.h" 28 #include "remoting/client/client_context.h"
30 #include "remoting/client/key_event_mapper.h" 29 #include "remoting/client/key_event_mapper.h"
31 #include "remoting/client/plugin/mac_key_event_processor.h" 30 #include "remoting/client/plugin/mac_key_event_processor.h"
32 #include "remoting/client/plugin/pepper_plugin_thread_delegate.h" 31 #include "remoting/client/plugin/pepper_plugin_thread_delegate.h"
33 #include "remoting/proto/event.pb.h" 32 #include "remoting/proto/event.pb.h"
34 #include "remoting/protocol/clipboard_stub.h" 33 #include "remoting/protocol/clipboard_stub.h"
35 #include "remoting/protocol/cursor_shape_stub.h" 34 #include "remoting/protocol/cursor_shape_stub.h"
36 #include "remoting/protocol/connection_to_host.h" 35 #include "remoting/protocol/connection_to_host.h"
37 36
38 namespace base { 37 namespace base {
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 KeyEventMapper key_mapper_; 212 KeyEventMapper key_mapper_;
214 scoped_ptr<PepperInputHandler> input_handler_; 213 scoped_ptr<PepperInputHandler> input_handler_;
215 scoped_ptr<ChromotingClient> client_; 214 scoped_ptr<ChromotingClient> client_;
216 215
217 // XmppProxy is a refcounted interface used to perform thread-switching and 216 // XmppProxy is a refcounted interface used to perform thread-switching and
218 // detaching between objects whose lifetimes are controlled by pepper, and 217 // detaching between objects whose lifetimes are controlled by pepper, and
219 // jingle_glue objects. This is used when if we start a sandboxed jingle 218 // jingle_glue objects. This is used when if we start a sandboxed jingle
220 // connection. 219 // connection.
221 scoped_refptr<PepperXmppProxy> xmpp_proxy_; 220 scoped_refptr<PepperXmppProxy> xmpp_proxy_;
222 221
223 scoped_ptr<ScopedThreadProxy> thread_proxy_; 222 base::WeakPtrFactory<ChromotingInstance> weak_factory_;
224 223
225 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance); 224 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance);
226 }; 225 };
227 226
228 } // namespace remoting 227 } // namespace remoting
229 228
230 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ 229 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_
OLDNEW
« no previous file with comments | « remoting/client/chromoting_client.cc ('k') | remoting/client/plugin/chromoting_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698