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

Side by Side Diff: content/child/webthread_impl.h

Issue 959803003: web-threads: Create a single instance of WebThread for each blink thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 9 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_CHILD_WEBTHREAD_IMPL_H_ 5 #ifndef CONTENT_CHILD_WEBTHREAD_IMPL_H_
6 #define CONTENT_CHILD_WEBTHREAD_IMPL_H_ 6 #define CONTENT_CHILD_WEBTHREAD_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 // WebThreadBase implementation. 74 // WebThreadBase implementation.
75 base::SingleThreadTaskRunner* TaskRunner() const override; 75 base::SingleThreadTaskRunner* TaskRunner() const override;
76 76
77 private: 77 private:
78 base::MessageLoop* MessageLoop() const override; 78 base::MessageLoop* MessageLoop() const override;
79 79
80 scoped_ptr<base::Thread> thread_; 80 scoped_ptr<base::Thread> thread_;
81 }; 81 };
82 82
83 class WebThreadImplForMessageLoop : public WebThreadBase {
84 public:
85 CONTENT_EXPORT explicit WebThreadImplForMessageLoop(
86 scoped_refptr<base::SingleThreadTaskRunner> owning_thread_task_runner);
87 CONTENT_EXPORT virtual ~WebThreadImplForMessageLoop();
88
89 // blink::WebThread implementation.
90 blink::PlatformThreadId threadId() const override;
91
92 // WebThreadBase implementation.
93 base::MessageLoop* MessageLoop() const override;
94
95 private:
96 base::SingleThreadTaskRunner* TaskRunner() const override;
97
98 scoped_refptr<base::SingleThreadTaskRunner> owning_thread_task_runner_;
99 blink::PlatformThreadId thread_id_;
100 };
101
102 } // namespace content 83 } // namespace content
103 84
104 #endif // CONTENT_CHILD_WEBTHREAD_IMPL_H_ 85 #endif // CONTENT_CHILD_WEBTHREAD_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698