| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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_PPAPI_PLUGIN_PPAPI_WEBKIT_THREAD_H_ | 5 #ifndef CONTENT_PPAPI_PLUGIN_PPAPI_WEBKIT_THREAD_H_ |
| 6 #define CONTENT_PPAPI_PLUGIN_PPAPI_WEBKIT_THREAD_H_ | 6 #define CONTENT_PPAPI_PLUGIN_PPAPI_WEBKIT_THREAD_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 const base::Closure& task); | 26 const base::Closure& task); |
| 27 | 27 |
| 28 private: | 28 private: |
| 29 // Must be private so that we can carefully control its lifetime. | 29 // Must be private so that we can carefully control its lifetime. |
| 30 class InternalWebKitThread : public base::Thread { | 30 class InternalWebKitThread : public base::Thread { |
| 31 public: | 31 public: |
| 32 InternalWebKitThread(); | 32 InternalWebKitThread(); |
| 33 virtual ~InternalWebKitThread(); | 33 virtual ~InternalWebKitThread(); |
| 34 // Does the actual initialization and shutdown of WebKit. Called at the | 34 // Does the actual initialization and shutdown of WebKit. Called at the |
| 35 // beginning and end of the thread's lifetime. | 35 // beginning and end of the thread's lifetime. |
| 36 virtual void Init(); | 36 virtual void Init() OVERRIDE; |
| 37 virtual void CleanUp(); | 37 virtual void CleanUp() OVERRIDE; |
| 38 | 38 |
| 39 private: | 39 private: |
| 40 // The WebKitPlatformSupport implementation. Only access on WebKit thread. | 40 // The WebKitPlatformSupport implementation. Only access on WebKit thread. |
| 41 scoped_ptr<PpapiWebKitPlatformSupportImpl> webkit_platform_support_; | 41 scoped_ptr<PpapiWebKitPlatformSupportImpl> webkit_platform_support_; |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 // Pointer to the actual WebKitThread. | 44 // Pointer to the actual WebKitThread. |
| 45 scoped_ptr<InternalWebKitThread> webkit_thread_; | 45 scoped_ptr<InternalWebKitThread> webkit_thread_; |
| 46 | 46 |
| 47 DISALLOW_COPY_AND_ASSIGN(PpapiWebKitThread); | 47 DISALLOW_COPY_AND_ASSIGN(PpapiWebKitThread); |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 #endif // CONTENT_PPAPI_PLUGIN_PPAPI_WEBKIT_THREAD_H_ | 50 #endif // CONTENT_PPAPI_PLUGIN_PPAPI_WEBKIT_THREAD_H_ |
| OLD | NEW |