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

Side by Side Diff: remoting/host/host_user_interface.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/plugin/chromoting_instance.cc ('k') | remoting/host/host_user_interface.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 #ifndef REMOTING_HOST_HOST_USER_INTERFACE_H_ 5 #ifndef REMOTING_HOST_HOST_USER_INTERFACE_H_
6 #define REMOTING_HOST_HOST_USER_INTERFACE_H_ 6 #define REMOTING_HOST_HOST_USER_INTERFACE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 14 #include "base/memory/weak_ptr.h"
15 #include "remoting/base/scoped_thread_proxy.h" 15 #include "base/message_loop_proxy.h"
16 #include "remoting/host/host_status_observer.h" 16 #include "remoting/host/host_status_observer.h"
17 17
18 namespace remoting { 18 namespace remoting {
19 19
20 class ChromotingHost; 20 class ChromotingHost;
21 class ChromotingHostContext; 21 class ChromotingHostContext;
22 class DisconnectWindow; 22 class DisconnectWindow;
23 class LocalInputMonitor; 23 class LocalInputMonitor;
24 class SignalStrategy; 24 class SignalStrategy;
25 25
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 // Provide a user interface allowing the host user to close the connection. 89 // Provide a user interface allowing the host user to close the connection.
90 scoped_ptr<DisconnectWindow> disconnect_window_; 90 scoped_ptr<DisconnectWindow> disconnect_window_;
91 91
92 // Monitor local inputs to allow remote inputs to be blocked while the local 92 // Monitor local inputs to allow remote inputs to be blocked while the local
93 // user is trying to do something. 93 // user is trying to do something.
94 scoped_ptr<LocalInputMonitor> local_input_monitor_; 94 scoped_ptr<LocalInputMonitor> local_input_monitor_;
95 95
96 bool is_monitoring_local_inputs_; 96 bool is_monitoring_local_inputs_;
97 97
98 ScopedThreadProxy ui_thread_proxy_; 98 // WeakPtr used to avoid tasks accessing the client after it is deleted.
99 base::WeakPtrFactory<HostUserInterface> weak_factory_;
100 base::WeakPtr<HostUserInterface> weak_ptr_;
99 101
100 DISALLOW_COPY_AND_ASSIGN(HostUserInterface); 102 DISALLOW_COPY_AND_ASSIGN(HostUserInterface);
101 }; 103 };
102 104
103 } // namespace remoting 105 } // namespace remoting
104 106
105 #endif // REMOTING_HOST_HOST_USER_INTERFACE_H_ 107 #endif // REMOTING_HOST_HOST_USER_INTERFACE_H_
OLDNEW
« no previous file with comments | « remoting/client/plugin/chromoting_instance.cc ('k') | remoting/host/host_user_interface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698