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

Side by Side Diff: content/ppapi_plugin/ppapi_thread.h

Issue 8316008: Add a new globals object for PPAPI tracking information. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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
OLDNEW
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 <map> 9 #include <map>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/process.h" 14 #include "base/process.h"
15 #include "base/scoped_native_library.h" 15 #include "base/scoped_native_library.h"
16 #include "build/build_config.h" 16 #include "build/build_config.h"
17 #include "content/common/child_thread.h" 17 #include "content/common/child_thread.h"
18 #include "ppapi/c/pp_module.h" 18 #include "ppapi/c/pp_module.h"
19 #include "ppapi/c/trusted/ppp_broker.h" 19 #include "ppapi/c/trusted/ppp_broker.h"
20 #include "ppapi/proxy/plugin_dispatcher.h" 20 #include "ppapi/proxy/plugin_dispatcher.h"
21 #include "ppapi/proxy/plugin_globals.h"
21 22
22 class FilePath; 23 class FilePath;
23 class PpapiWebKitThread; 24 class PpapiWebKitThread;
24 25
25 namespace IPC { 26 namespace IPC {
26 struct ChannelHandle; 27 struct ChannelHandle;
27 } 28 }
28 29
29 class PpapiThread : public ChildThread, 30 class PpapiThread : public ChildThread,
30 public ppapi::proxy::PluginDispatcher::PluginDelegate { 31 public ppapi::proxy::PluginDispatcher::PluginDelegate {
(...skipping 28 matching lines...) Expand all
59 // fills the given ChannelHandle with the information from the new channel. 60 // fills the given ChannelHandle with the information from the new channel.
60 bool SetupRendererChannel(base::ProcessHandle host_process_handle, 61 bool SetupRendererChannel(base::ProcessHandle host_process_handle,
61 int renderer_id, 62 int renderer_id,
62 IPC::ChannelHandle* handle); 63 IPC::ChannelHandle* handle);
63 64
64 // True if running in a broker process rather than a normal plugin process. 65 // True if running in a broker process rather than a normal plugin process.
65 bool is_broker_; 66 bool is_broker_;
66 67
67 base::ScopedNativeLibrary library_; 68 base::ScopedNativeLibrary library_;
68 69
70 // Global state tracking for the proxy.
71 ppapi::proxy::PluginGlobals plugin_globals_;
72
69 ppapi::proxy::Dispatcher::GetInterfaceFunc get_plugin_interface_; 73 ppapi::proxy::Dispatcher::GetInterfaceFunc get_plugin_interface_;
70 74
71 // Callback to call when a new instance connects to the broker. 75 // Callback to call when a new instance connects to the broker.
72 // Used only when is_broker_. 76 // Used only when is_broker_.
73 PP_ConnectInstance_Func connect_instance_func_; 77 PP_ConnectInstance_Func connect_instance_func_;
74 78
75 // Local concept of the module ID. Some functions take this. It's necessary 79 // Local concept of the module ID. Some functions take this. It's necessary
76 // for the in-process PPAPI to handle this properly, but for proxied it's 80 // for the in-process PPAPI to handle this properly, but for proxied it's
77 // unnecessary. The proxy talking to multiple renderers means that each 81 // unnecessary. The proxy talking to multiple renderers means that each
78 // renderer has a different idea of what the module ID is for this plugin. 82 // renderer has a different idea of what the module ID is for this plugin.
(...skipping 10 matching lines...) Expand all
89 scoped_ptr<PpapiWebKitThread> webkit_thread_; 93 scoped_ptr<PpapiWebKitThread> webkit_thread_;
90 94
91 // The PluginDispatcher instances contained in the map are not owned by it. 95 // The PluginDispatcher instances contained in the map are not owned by it.
92 std::map<uint32, ppapi::proxy::PluginDispatcher*> plugin_dispatchers_; 96 std::map<uint32, ppapi::proxy::PluginDispatcher*> plugin_dispatchers_;
93 uint32 next_plugin_dispatcher_id_; 97 uint32 next_plugin_dispatcher_id_;
94 98
95 DISALLOW_IMPLICIT_CONSTRUCTORS(PpapiThread); 99 DISALLOW_IMPLICIT_CONSTRUCTORS(PpapiThread);
96 }; 100 };
97 101
98 #endif // CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ 102 #endif // CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698