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

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

Issue 719983002: Reporting of policy errors via host-offline-reason: part 3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@hor-nohoststatussender
Patch Set: Trying to see how things look without mock_callback.h Created 6 years 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
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_CHROMOTING_HOST_CONTEXT_H_ 5 #ifndef REMOTING_HOST_CHROMOTING_HOST_CONTEXT_H_
6 #define REMOTING_HOST_CHROMOTING_HOST_CONTEXT_H_ 6 #define REMOTING_HOST_CHROMOTING_HOST_CONTEXT_H_
7 7
8 #include "base/gtest_prod_util.h" 8 #include "base/gtest_prod_util.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 29 matching lines...) Expand all
40 // Instead, we re-use the |url_request_context_getter| in the browser process. 40 // Instead, we re-use the |url_request_context_getter| in the browser process.
41 static scoped_ptr<ChromotingHostContext> CreateForChromeOS( 41 static scoped_ptr<ChromotingHostContext> CreateForChromeOS(
42 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter); 42 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter);
43 #endif // defined(OS_CHROMEOS) 43 #endif // defined(OS_CHROMEOS)
44 44
45 ~ChromotingHostContext(); 45 ~ChromotingHostContext();
46 46
47 scoped_ptr<ChromotingHostContext> Copy(); 47 scoped_ptr<ChromotingHostContext> Copy();
48 48
49 // Task runner for the thread that is used for the UI. 49 // Task runner for the thread that is used for the UI.
50 scoped_refptr<AutoThreadTaskRunner> ui_task_runner(); 50 scoped_refptr<AutoThreadTaskRunner> ui_task_runner() const;
51 51
52 // Task runner for the thread used for audio capture and encoding. 52 // Task runner for the thread used for audio capture and encoding.
53 scoped_refptr<AutoThreadTaskRunner> audio_task_runner(); 53 scoped_refptr<AutoThreadTaskRunner> audio_task_runner() const;
54 54
55 // Task runner for the thread that is used for blocking file 55 // Task runner for the thread that is used for blocking file
56 // IO. This thread is used by the URLRequestContext to read proxy 56 // IO. This thread is used by the URLRequestContext to read proxy
57 // configuration and by NatConfig to read policy configs. 57 // configuration and by NatConfig to read policy configs.
58 scoped_refptr<AutoThreadTaskRunner> file_task_runner(); 58 scoped_refptr<AutoThreadTaskRunner> file_task_runner() const;
59 59
60 // Task runner for the thread that is used by the InputInjector. 60 // Task runner for the thread that is used by the InputInjector.
61 // 61 //
62 // TODO(sergeyu): Do we need a separate thread for InputInjector? 62 // TODO(sergeyu): Do we need a separate thread for InputInjector?
63 // Can we use some other thread instead? 63 // Can we use some other thread instead?
64 scoped_refptr<AutoThreadTaskRunner> input_task_runner(); 64 scoped_refptr<AutoThreadTaskRunner> input_task_runner() const;
65 65
66 // Task runner for the thread used for network IO. This thread runs 66 // Task runner for the thread used for network IO. This thread runs
67 // a libjingle message loop, and is the only thread on which 67 // a libjingle message loop, and is the only thread on which
68 // libjingle code may be run. 68 // libjingle code may be run.
69 scoped_refptr<AutoThreadTaskRunner> network_task_runner(); 69 scoped_refptr<AutoThreadTaskRunner> network_task_runner() const;
70 70
71 // Task runner for the thread used by the ScreenRecorder to capture 71 // Task runner for the thread used by the ScreenRecorder to capture
72 // the screen. 72 // the screen.
73 scoped_refptr<AutoThreadTaskRunner> video_capture_task_runner(); 73 scoped_refptr<AutoThreadTaskRunner> video_capture_task_runner() const;
74 74
75 // Task runner for the thread used to encode video streams. 75 // Task runner for the thread used to encode video streams.
76 scoped_refptr<AutoThreadTaskRunner> video_encode_task_runner(); 76 scoped_refptr<AutoThreadTaskRunner> video_encode_task_runner() const;
77 77
78 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter(); 78 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter()
79 const;
79 80
80 private: 81 private:
81 ChromotingHostContext( 82 ChromotingHostContext(
82 scoped_refptr<AutoThreadTaskRunner> ui_task_runner, 83 scoped_refptr<AutoThreadTaskRunner> ui_task_runner,
83 scoped_refptr<AutoThreadTaskRunner> audio_task_runner, 84 scoped_refptr<AutoThreadTaskRunner> audio_task_runner,
84 scoped_refptr<AutoThreadTaskRunner> file_task_runner, 85 scoped_refptr<AutoThreadTaskRunner> file_task_runner,
85 scoped_refptr<AutoThreadTaskRunner> input_task_runner, 86 scoped_refptr<AutoThreadTaskRunner> input_task_runner,
86 scoped_refptr<AutoThreadTaskRunner> network_task_runner, 87 scoped_refptr<AutoThreadTaskRunner> network_task_runner,
87 scoped_refptr<AutoThreadTaskRunner> video_capture_task_runner, 88 scoped_refptr<AutoThreadTaskRunner> video_capture_task_runner,
88 scoped_refptr<AutoThreadTaskRunner> video_encode_task_runner, 89 scoped_refptr<AutoThreadTaskRunner> video_encode_task_runner,
(...skipping 22 matching lines...) Expand all
111 112
112 // Serves URLRequestContexts that use the network and UI task runners. 113 // Serves URLRequestContexts that use the network and UI task runners.
113 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_; 114 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_;
114 115
115 DISALLOW_COPY_AND_ASSIGN(ChromotingHostContext); 116 DISALLOW_COPY_AND_ASSIGN(ChromotingHostContext);
116 }; 117 };
117 118
118 } // namespace remoting 119 } // namespace remoting
119 120
120 #endif // REMOTING_HOST_CHROMOTING_HOST_CONTEXT_H_ 121 #endif // REMOTING_HOST_CHROMOTING_HOST_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698