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

Side by Side Diff: content/public/utility/utility_thread.h

Issue 2832633002: Add PDF compositor service (Closed)
Patch Set: rebase Created 3 years, 7 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
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 CONTENT_PUBLIC_UTILITY_UTILITY_THREAD_H_ 5 #ifndef CONTENT_PUBLIC_UTILITY_UTILITY_THREAD_H_
6 #define CONTENT_PUBLIC_UTILITY_UTILITY_THREAD_H_ 6 #define CONTENT_PUBLIC_UTILITY_UTILITY_THREAD_H_
7 7
8 #include "base/memory/ref_counted.h"
9 #include "base/single_thread_task_runner.h"
8 #include "content/public/child/child_thread.h" 10 #include "content/public/child/child_thread.h"
9 11
10 namespace content { 12 namespace content {
11 13
12 class CONTENT_EXPORT UtilityThread : virtual public ChildThread { 14 class CONTENT_EXPORT UtilityThread : virtual public ChildThread {
13 public: 15 public:
14 // Returns the one utility thread for this process. Note that this can only 16 // Returns the one utility thread for this process. Note that this can only
15 // be accessed when running on the utility thread itself. 17 // be accessed when running on the utility thread itself.
16 static UtilityThread* Get(); 18 static UtilityThread* Get();
17 19
18 UtilityThread(); 20 UtilityThread();
19 ~UtilityThread() override; 21 ~UtilityThread() override;
20 22
23 virtual scoped_refptr<base::SingleThreadTaskRunner> GetIOTaskRunner() = 0;
jam 2017/04/28 15:49:10 since RenderThread (another class derived from Chi
Wei Li 2017/04/29 04:35:18 Good idea. I moved it to ChildThread, but there is
24
21 // Releases the process if we are not (or no longer) in batch mode. 25 // Releases the process if we are not (or no longer) in batch mode.
22 virtual void ReleaseProcessIfNeeded() = 0; 26 virtual void ReleaseProcessIfNeeded() = 0;
23 27
24 // Initializes blink if it hasn't already been initialized. 28 // Initializes blink if it hasn't already been initialized.
25 virtual void EnsureBlinkInitialized() = 0; 29 virtual void EnsureBlinkInitialized() = 0;
26 }; 30 };
27 31
28 } // namespace content 32 } // namespace content
29 33
30 #endif // CONTENT_PUBLIC_UTILITY_UTILITY_THREAD_H_ 34 #endif // CONTENT_PUBLIC_UTILITY_UTILITY_THREAD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698