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

Side by Side Diff: sky/engine/core/html/parser/HTMLParserThread.cpp

Issue 1215103007: Remove remaining HTML elements (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "sky/engine/core/html/parser/HTMLParserThread.h"
6
7 #include "base/threading/thread.h"
8 #include "sky/engine/wtf/Assertions.h"
9
10 namespace blink {
11
12 static base::Thread* s_thread = 0;
13 static base::SingleThreadTaskRunner* s_taskRunner = 0;
14
15 void HTMLParserThread::start()
16 {
17 ASSERT(!s_thread);
18 s_thread = new base::Thread("HTMLParserThread");
19 s_thread->Start();
20 s_thread->task_runner().swap(&s_taskRunner);
21 }
22
23 void HTMLParserThread::stop()
24 {
25 ASSERT(s_thread);
26 base::Thread* thread = s_thread;
27 s_thread = 0;
28
29 scoped_refptr<base::SingleThreadTaskRunner> taskRunner;
30 taskRunner.swap(&s_taskRunner);
31
32 delete thread;
33 taskRunner = nullptr;
34 }
35
36 base::SingleThreadTaskRunner* HTMLParserThread::taskRunner()
37 {
38 ASSERT(s_taskRunner);
39 return s_taskRunner;
40 }
41
42 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/html/parser/HTMLParserThread.h ('k') | sky/engine/core/html/parser/HTMLScriptRunner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698