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

Side by Side Diff: remoting/host/host_window.h

Issue 2911893003: Deprecate NonThreadSafe in remoting in favor of SequenceChecker. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « remoting/host/host_status_logger.cc ('k') | remoting/host/host_window.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_WINDOW_H_ 5 #ifndef REMOTING_HOST_HOST_WINDOW_H_
6 #define REMOTING_HOST_HOST_WINDOW_H_ 6 #define REMOTING_HOST_HOST_WINDOW_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "base/threading/non_thread_safe.h" 13 #include "base/sequence_checker.h"
14 14
15 namespace remoting { 15 namespace remoting {
16 16
17 class ClientSessionControl; 17 class ClientSessionControl;
18 18
19 class HostWindow : public base::NonThreadSafe { 19 class HostWindow {
20 public: 20 public:
21 virtual ~HostWindow() {} 21 virtual ~HostWindow();
22 22
23 // Creates a platform-specific instance of the continue window. 23 // Creates a platform-specific instance of the continue window.
24 static std::unique_ptr<HostWindow> CreateContinueWindow(); 24 static std::unique_ptr<HostWindow> CreateContinueWindow();
25 25
26 // Creates a platform-specific instance of the disconnect window. 26 // Creates a platform-specific instance of the disconnect window.
27 static std::unique_ptr<HostWindow> CreateDisconnectWindow(); 27 static std::unique_ptr<HostWindow> CreateDisconnectWindow();
28 28
29 // Starts the UI state machine. |client_session_control| will be used to 29 // Starts the UI state machine. |client_session_control| will be used to
30 // notify the caller about the local user's actions. 30 // notify the caller about the local user's actions.
31 virtual void Start( 31 virtual void Start(
32 const base::WeakPtr<ClientSessionControl>& client_session_control) = 0; 32 const base::WeakPtr<ClientSessionControl>& client_session_control) = 0;
33 33
34 protected: 34 protected:
35 // Let |HostWindowProxy| to call DetachFromSequence() when passing an instance
36 // of |HostWindow| to a different sequence.
37 friend class HostWindowProxy;
38
35 HostWindow() {} 39 HostWindow() {}
36 40
41 SEQUENCE_CHECKER(sequence_checker_);
42
37 private: 43 private:
38 // Let |HostWindowProxy| to call DetachFromThread() when passing an instance
39 // of |HostWindow| to a different thread.
40 friend class HostWindowProxy;
41
42 DISALLOW_COPY_AND_ASSIGN(HostWindow); 44 DISALLOW_COPY_AND_ASSIGN(HostWindow);
43 }; 45 };
44 46
45 } // namespace remoting 47 } // namespace remoting
46 48
47 #endif // REMOTING_HOST_HOST_WINDOW_H_ 49 #endif // REMOTING_HOST_HOST_WINDOW_H_
OLDNEW
« no previous file with comments | « remoting/host/host_status_logger.cc ('k') | remoting/host/host_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698