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_THREAD_H_ | 5 #ifndef CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ |
6 #define CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ | 6 #define CONTENT_PPAPI_PLUGIN_PPAPI_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" |
11 #include "base/process.h" | 11 #include "base/process.h" |
12 #include "base/scoped_native_library.h" | 12 #include "base/scoped_native_library.h" |
13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
14 #include "content/common/child_thread.h" | 14 #include "content/common/child_thread.h" |
15 #include "ppapi/c/pp_module.h" | 15 #include "ppapi/c/pp_module.h" |
16 #include "ppapi/c/trusted/ppp_broker.h" | 16 #include "ppapi/c/trusted/ppp_broker.h" |
17 #include "ppapi/proxy/plugin_dispatcher.h" | 17 #include "ppapi/proxy/plugin_dispatcher.h" |
18 | 18 |
19 class FilePath; | 19 class FilePath; |
20 class PpapiWebKitThread; | 20 class PpapiWebKitThread; |
21 | 21 |
22 namespace IPC { | 22 namespace IPC { |
23 struct ChannelHandle; | 23 struct ChannelHandle; |
24 } | 24 } |
25 | 25 |
26 class PpapiThread : public ChildThread, | 26 class PpapiThread : public ChildThread, |
27 public pp::proxy::PluginDispatcher::PluginDelegate { | 27 public pp::proxy::PluginDispatcher::PluginDelegate { |
28 public: | 28 public: |
29 explicit PpapiThread(bool is_broker); | 29 explicit PpapiThread(bool is_broker); |
30 ~PpapiThread(); | 30 virtual ~PpapiThread(); |
31 | 31 |
32 private: | 32 private: |
33 // ChildThread overrides. | 33 // ChildThread overrides. |
34 virtual bool OnMessageReceived(const IPC::Message& msg); | 34 virtual bool OnMessageReceived(const IPC::Message& msg); |
35 | 35 |
36 // Dispatcher::Delegate implementation. | 36 // Dispatcher::Delegate implementation. |
37 virtual base::MessageLoopProxy* GetIPCMessageLoop(); | 37 virtual base::MessageLoopProxy* GetIPCMessageLoop(); |
38 virtual base::WaitableEvent* GetShutdownEvent(); | 38 virtual base::WaitableEvent* GetShutdownEvent(); |
39 virtual std::set<PP_Instance>* GetGloballySeenInstanceIDSet(); | 39 virtual std::set<PP_Instance>* GetGloballySeenInstanceIDSet(); |
40 virtual ppapi::WebKitForwarding* GetWebKitForwarding(); | 40 virtual ppapi::WebKitForwarding* GetWebKitForwarding(); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 | 77 |
78 // Lazily created by GetWebKitForwarding. | 78 // Lazily created by GetWebKitForwarding. |
79 scoped_ptr<ppapi::WebKitForwarding> webkit_forwarding_; | 79 scoped_ptr<ppapi::WebKitForwarding> webkit_forwarding_; |
80 | 80 |
81 scoped_ptr<PpapiWebKitThread> webkit_thread_; | 81 scoped_ptr<PpapiWebKitThread> webkit_thread_; |
82 | 82 |
83 DISALLOW_IMPLICIT_CONSTRUCTORS(PpapiThread); | 83 DISALLOW_IMPLICIT_CONSTRUCTORS(PpapiThread); |
84 }; | 84 }; |
85 | 85 |
86 #endif // CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ | 86 #endif // CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ |
OLD | NEW |