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

Unified Diff: content/ppapi_plugin/ppapi_webkit_thread.cc

Issue 6981001: Make the Pepper proxy support in-process font rendering. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/ppapi_plugin/ppapi_webkit_thread.h ('k') | content/ppapi_plugin/ppapi_webkitclient_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/ppapi_plugin/ppapi_webkit_thread.cc
===================================================================
--- content/ppapi_plugin/ppapi_webkit_thread.cc (revision 0)
+++ content/ppapi_plugin/ppapi_webkit_thread.cc (revision 0)
@@ -0,0 +1,44 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/ppapi_plugin/ppapi_webkit_thread.h"
+
+#include "base/logging.h"
+#include "content/ppapi_plugin/ppapi_webkitclient_impl.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
+
+PpapiWebKitThread::PpapiWebKitThread() {
+ DCHECK(!webkit_thread_.get());
+
+ webkit_thread_.reset(new InternalWebKitThread);
+ bool started = webkit_thread_->Start();
+ DCHECK(started);
+}
+
+PpapiWebKitThread::~PpapiWebKitThread() {
+}
+
+void PpapiWebKitThread::PostTask(const tracked_objects::Location& from_here,
+ const base::Closure& task) {
+ webkit_thread_->message_loop()->PostTask(from_here, task);
+}
+
+PpapiWebKitThread::InternalWebKitThread::InternalWebKitThread()
+ : base::Thread("PPAPIWebKit") {
+}
+
+PpapiWebKitThread::InternalWebKitThread::~InternalWebKitThread() {
+ Stop();
+}
+
+void PpapiWebKitThread::InternalWebKitThread::Init() {
+ DCHECK(!webkit_client_.get());
+ webkit_client_.reset(new PpapiWebKitClientImpl);
+ WebKit::initialize(webkit_client_.get());
+}
+
+void PpapiWebKitThread::InternalWebKitThread::CleanUp() {
+ DCHECK(webkit_client_.get());
+ WebKit::shutdown();
+}
Property changes on: content/ppapi_plugin/ppapi_webkit_thread.cc
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « content/ppapi_plugin/ppapi_webkit_thread.h ('k') | content/ppapi_plugin/ppapi_webkitclient_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698