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

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

Issue 1544273002: Switch to standard integer types in content/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
« no previous file with comments | « content/ppapi_plugin/ppapi_blink_platform_impl.cc ('k') | content/ppapi_plugin/ppapi_thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 7
8 #include <stdint.h>
9
8 #include <map> 10 #include <map>
9 #include <string> 11 #include <string>
10 12
11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/macros.h"
13 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
14 #include "base/process/process.h" 16 #include "base/process/process.h"
15 #include "base/scoped_native_library.h" 17 #include "base/scoped_native_library.h"
16 #include "build/build_config.h" 18 #include "build/build_config.h"
17 #include "content/child/child_thread_impl.h" 19 #include "content/child/child_thread_impl.h"
18 #include "content/public/common/pepper_plugin_info.h" 20 #include "content/public/common/pepper_plugin_info.h"
19 #include "ppapi/c/pp_module.h" 21 #include "ppapi/c/pp_module.h"
20 #include "ppapi/c/trusted/ppp_broker.h" 22 #include "ppapi/c/trusted/ppp_broker.h"
21 #include "ppapi/proxy/connection.h" 23 #include "ppapi/proxy/connection.h"
22 #include "ppapi/proxy/plugin_dispatcher.h" 24 #include "ppapi/proxy/plugin_dispatcher.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 ENTRY_POINT_MISSING, 65 ENTRY_POINT_MISSING,
64 INIT_FAILED, 66 INIT_FAILED,
65 FILE_MISSING, 67 FILE_MISSING,
66 // NOTE: Add new values only immediately above this line. 68 // NOTE: Add new values only immediately above this line.
67 LOAD_RESULT_MAX // Boundary value for UMA_HISTOGRAM_ENUMERATION. 69 LOAD_RESULT_MAX // Boundary value for UMA_HISTOGRAM_ENUMERATION.
68 }; 70 };
69 71
70 // ChildThread overrides. 72 // ChildThread overrides.
71 bool Send(IPC::Message* msg) override; 73 bool Send(IPC::Message* msg) override;
72 bool OnControlMessageReceived(const IPC::Message& msg) override; 74 bool OnControlMessageReceived(const IPC::Message& msg) override;
73 void OnChannelConnected(int32 peer_pid) override; 75 void OnChannelConnected(int32_t peer_pid) override;
74 76
75 // PluginDispatcher::PluginDelegate implementation. 77 // PluginDispatcher::PluginDelegate implementation.
76 std::set<PP_Instance>* GetGloballySeenInstanceIDSet() override; 78 std::set<PP_Instance>* GetGloballySeenInstanceIDSet() override;
77 base::SingleThreadTaskRunner* GetIPCTaskRunner() override; 79 base::SingleThreadTaskRunner* GetIPCTaskRunner() override;
78 base::WaitableEvent* GetShutdownEvent() override; 80 base::WaitableEvent* GetShutdownEvent() override;
79 IPC::PlatformFileForTransit ShareHandleWithRemote( 81 IPC::PlatformFileForTransit ShareHandleWithRemote(
80 base::PlatformFile handle, 82 base::PlatformFile handle,
81 base::ProcessId peer_pid, 83 base::ProcessId peer_pid,
82 bool should_close_source) override; 84 bool should_close_source) override;
83 base::SharedMemoryHandle ShareSharedMemoryHandleWithRemote( 85 base::SharedMemoryHandle ShareSharedMemoryHandleWithRemote(
84 const base::SharedMemoryHandle& handle, 86 const base::SharedMemoryHandle& handle,
85 base::ProcessId remote_pid) override; 87 base::ProcessId remote_pid) override;
86 uint32 Register(ppapi::proxy::PluginDispatcher* plugin_dispatcher) override; 88 uint32_t Register(ppapi::proxy::PluginDispatcher* plugin_dispatcher) override;
87 void Unregister(uint32 plugin_dispatcher_id) override; 89 void Unregister(uint32_t plugin_dispatcher_id) override;
88 90
89 // PluginProxyDelegate. 91 // PluginProxyDelegate.
90 // SendToBrowser() is intended to be safe to use on another thread so 92 // SendToBrowser() is intended to be safe to use on another thread so
91 // long as the main PpapiThread outlives it. 93 // long as the main PpapiThread outlives it.
92 IPC::Sender* GetBrowserSender() override; 94 IPC::Sender* GetBrowserSender() override;
93 std::string GetUILanguage() override; 95 std::string GetUILanguage() override;
94 void PreCacheFontForFlash(const void* logfontw) override; 96 void PreCacheFontForFlash(const void* logfontw) override;
95 void SetActiveURL(const std::string& url) override; 97 void SetActiveURL(const std::string& url) override;
96 PP_Resource CreateBrowserFont(ppapi::proxy::Connection connection, 98 PP_Resource CreateBrowserFont(ppapi::proxy::Connection connection,
97 PP_Instance instance, 99 PP_Instance instance,
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 // unnecessary. The proxy talking to multiple renderers means that each 152 // unnecessary. The proxy talking to multiple renderers means that each
151 // renderer has a different idea of what the module ID is for this plugin. 153 // renderer has a different idea of what the module ID is for this plugin.
152 // To force people to "do the right thing" we generate a random module ID 154 // To force people to "do the right thing" we generate a random module ID
153 // and pass it around as necessary. 155 // and pass it around as necessary.
154 PP_Module local_pp_module_; 156 PP_Module local_pp_module_;
155 157
156 // See Dispatcher::Delegate::GetGloballySeenInstanceIDSet. 158 // See Dispatcher::Delegate::GetGloballySeenInstanceIDSet.
157 std::set<PP_Instance> globally_seen_instance_ids_; 159 std::set<PP_Instance> globally_seen_instance_ids_;
158 160
159 // The PluginDispatcher instances contained in the map are not owned by it. 161 // The PluginDispatcher instances contained in the map are not owned by it.
160 std::map<uint32, ppapi::proxy::PluginDispatcher*> plugin_dispatchers_; 162 std::map<uint32_t, ppapi::proxy::PluginDispatcher*> plugin_dispatchers_;
161 uint32 next_plugin_dispatcher_id_; 163 uint32_t next_plugin_dispatcher_id_;
162 164
163 // The BlinkPlatformImpl implementation. 165 // The BlinkPlatformImpl implementation.
164 scoped_ptr<PpapiBlinkPlatformImpl> blink_platform_impl_; 166 scoped_ptr<PpapiBlinkPlatformImpl> blink_platform_impl_;
165 167
166 #if defined(OS_WIN) 168 #if defined(OS_WIN)
167 // Caches the handle to the peer process if this is a broker. 169 // Caches the handle to the peer process if this is a broker.
168 base::win::ScopedHandle peer_handle_; 170 base::win::ScopedHandle peer_handle_;
169 #endif 171 #endif
170 172
171 DISALLOW_IMPLICIT_CONSTRUCTORS(PpapiThread); 173 DISALLOW_IMPLICIT_CONSTRUCTORS(PpapiThread);
172 }; 174 };
173 175
174 #if defined(COMPILER_MSVC) 176 #if defined(COMPILER_MSVC)
175 #pragma warning(pop) 177 #pragma warning(pop)
176 #endif 178 #endif
177 179
178 } // namespace content 180 } // namespace content
179 181
180 #endif // CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ 182 #endif // CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_
OLDNEW
« no previous file with comments | « content/ppapi_plugin/ppapi_blink_platform_impl.cc ('k') | content/ppapi_plugin/ppapi_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698