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

Unified Diff: content/ppapi_plugin/ppapi_webkit_thread.h

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_thread.cc ('k') | content/ppapi_plugin/ppapi_webkit_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/ppapi_plugin/ppapi_webkit_thread.h
===================================================================
--- content/ppapi_plugin/ppapi_webkit_thread.h (revision 0)
+++ content/ppapi_plugin/ppapi_webkit_thread.h (revision 0)
@@ -0,0 +1,50 @@
+// 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.
+
+#ifndef CONTENT_PPAPI_PLUGIN_PPAPI_WEBKIT_THREAD_H_
+#define CONTENT_PPAPI_PLUGIN_PPAPI_WEBKIT_THREAD_H_
+#pragma once
+
+#include "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/threading/thread.h"
+
+class PpapiWebKitClientImpl;
+
+// This creates a WebKit main thread on instantiation on construction and kills
+// it on deletion. See also content/browser/in_process_webkit for the
+// corresponding concept in the browser process.
+class PpapiWebKitThread {
+ public:
+ PpapiWebKitThread();
+ ~PpapiWebKitThread();
+
+ // Posts the given task to the thread, see MessageLoop::PostTask.
+ void PostTask(
+ const tracked_objects::Location& from_here,
+ const base::Closure& task);
+
+ private:
+ // Must be private so that we can carefully control its lifetime.
+ class InternalWebKitThread : public base::Thread {
+ public:
+ InternalWebKitThread();
+ virtual ~InternalWebKitThread();
+ // Does the actual initialization and shutdown of WebKit. Called at the
+ // beginning and end of the thread's lifetime.
+ virtual void Init();
+ virtual void CleanUp();
+
+ private:
+ // The WebKitClient implementation. Only access on WebKit thread.
+ scoped_ptr<PpapiWebKitClientImpl> webkit_client_;
+ };
+
+ // Pointer to the actual WebKitThread.
+ scoped_ptr<InternalWebKitThread> webkit_thread_;
+
+ DISALLOW_COPY_AND_ASSIGN(PpapiWebKitThread);
+};
+
+#endif // CONTENT_PPAPI_PLUGIN_PPAPI_WEBKIT_THREAD_H_
Property changes on: content/ppapi_plugin/ppapi_webkit_thread.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « content/ppapi_plugin/ppapi_thread.cc ('k') | content/ppapi_plugin/ppapi_webkit_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698