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

Side by Side Diff: content/ppapi_plugin/ppapi_webkit_thread.cc

Issue 9192038: Relanding this with fixes to the mac dbg builder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « content/ppapi_plugin/ppapi_webkit_thread.h ('k') | ppapi/ppapi_shared.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011 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 "content/ppapi_plugin/ppapi_webkit_thread.h"
6
7 #include "base/logging.h"
8 #include "content/ppapi_plugin/ppapi_webkitplatformsupport_impl.h"
9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
10
11 PpapiWebKitThread::PpapiWebKitThread() {
12 DCHECK(!webkit_thread_.get());
13
14 webkit_thread_.reset(new InternalWebKitThread);
15 bool started = webkit_thread_->Start();
16 DCHECK(started);
17 }
18
19 PpapiWebKitThread::~PpapiWebKitThread() {
20 }
21
22 void PpapiWebKitThread::PostTask(const tracked_objects::Location& from_here,
23 const base::Closure& task) {
24 webkit_thread_->message_loop()->PostTask(from_here, task);
25 }
26
27 PpapiWebKitThread::InternalWebKitThread::InternalWebKitThread()
28 : base::Thread("PPAPIWebKit") {
29 }
30
31 PpapiWebKitThread::InternalWebKitThread::~InternalWebKitThread() {
32 Stop();
33 }
34
35 void PpapiWebKitThread::InternalWebKitThread::Init() {
36 DCHECK(!webkit_platform_support_.get());
37 webkit_platform_support_.reset(new PpapiWebKitPlatformSupportImpl);
38 WebKit::initialize(webkit_platform_support_.get());
39 }
40
41 void PpapiWebKitThread::InternalWebKitThread::CleanUp() {
42 DCHECK(webkit_platform_support_.get());
43 WebKit::shutdown();
44 }
OLDNEW
« no previous file with comments | « content/ppapi_plugin/ppapi_webkit_thread.h ('k') | ppapi/ppapi_shared.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698