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

Side by Side Diff: content/browser/ppapi_plugin_process_host.h

Issue 1549113002: Switch to standard integer types in content/browser/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
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_BROWSER_PPAPI_PLUGIN_PROCESS_HOST_H_ 5 #ifndef CONTENT_BROWSER_PPAPI_PLUGIN_PROCESS_HOST_H_
6 #define CONTENT_BROWSER_PPAPI_PLUGIN_PROCESS_HOST_H_ 6 #define CONTENT_BROWSER_PPAPI_PLUGIN_PROCESS_HOST_H_
7 7
8 #include <stdint.h>
9
8 #include <queue> 10 #include <queue>
9 #include <vector> 11 #include <vector>
10 12
11 #include "base/basictypes.h"
12 #include "base/files/file_path.h" 13 #include "base/files/file_path.h"
14 #include "base/macros.h"
13 #include "base/memory/ref_counted.h" 15 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h" 16 #include "base/memory/scoped_ptr.h"
15 #include "base/process/process.h" 17 #include "base/process/process.h"
16 #include "base/strings/string16.h" 18 #include "base/strings/string16.h"
17 #include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h" 19 #include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h"
18 #include "content/browser/renderer_host/pepper/pepper_message_filter.h" 20 #include "content/browser/renderer_host/pepper/pepper_message_filter.h"
19 #include "content/public/browser/browser_child_process_host_delegate.h" 21 #include "content/public/browser/browser_child_process_host_delegate.h"
20 #include "content/public/browser/browser_child_process_host_iterator.h" 22 #include "content/public/browser/browser_child_process_host_iterator.h"
21 #include "ipc/ipc_sender.h" 23 #include "ipc/ipc_sender.h"
22 #include "ppapi/shared_impl/ppapi_permissions.h" 24 #include "ppapi/shared_impl/ppapi_permissions.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 static PpapiPluginProcessHost* CreateBrokerHost( 78 static PpapiPluginProcessHost* CreateBrokerHost(
77 const PepperPluginInfo& info); 79 const PepperPluginInfo& info);
78 80
79 // Notification that a PP_Instance has been created and the associated 81 // Notification that a PP_Instance has been created and the associated
80 // renderer related data including the RenderView/Process pair for the given 82 // renderer related data including the RenderView/Process pair for the given
81 // plugin. This is necessary so that when the plugin calls us with a 83 // plugin. This is necessary so that when the plugin calls us with a
82 // PP_Instance we can find the RenderView associated with it without trusting 84 // PP_Instance we can find the RenderView associated with it without trusting
83 // the plugin. 85 // the plugin.
84 static void DidCreateOutOfProcessInstance( 86 static void DidCreateOutOfProcessInstance(
85 int plugin_process_id, 87 int plugin_process_id,
86 int32 pp_instance, 88 int32_t pp_instance,
87 const PepperRendererInstanceData& instance_data); 89 const PepperRendererInstanceData& instance_data);
88 90
89 // The opposite of DIdCreate... above. 91 // The opposite of DIdCreate... above.
90 static void DidDeleteOutOfProcessInstance(int plugin_process_id, 92 static void DidDeleteOutOfProcessInstance(int plugin_process_id,
91 int32 pp_instance); 93 int32_t pp_instance);
92 94
93 // Notification that a Plugin instance has been throttled or unthrottled. 95 // Notification that a Plugin instance has been throttled or unthrottled.
94 static void OnPluginInstanceThrottleStateChange(int plugin_process_id, 96 static void OnPluginInstanceThrottleStateChange(int plugin_process_id,
95 int32 pp_instance, 97 int32_t pp_instance,
96 bool is_throttled); 98 bool is_throttled);
97 99
98 // Returns the instances that match the specified process name. 100 // Returns the instances that match the specified process name.
99 // It can only be called on the IO thread. 101 // It can only be called on the IO thread.
100 static void FindByName(const base::string16& name, 102 static void FindByName(const base::string16& name,
101 std::vector<PpapiPluginProcessHost*>* hosts); 103 std::vector<PpapiPluginProcessHost*>* hosts);
102 104
103 // IPC::Sender implementation: 105 // IPC::Sender implementation:
104 bool Send(IPC::Message* message) override; 106 bool Send(IPC::Message* message) override;
105 107
(...skipping 22 matching lines...) Expand all
128 // Actually launches the process with the given plugin info. Returns true 130 // Actually launches the process with the given plugin info. Returns true
129 // on success (the process was spawned). 131 // on success (the process was spawned).
130 bool Init(const PepperPluginInfo& info); 132 bool Init(const PepperPluginInfo& info);
131 133
132 void RequestPluginChannel(Client* client); 134 void RequestPluginChannel(Client* client);
133 135
134 void OnProcessLaunched() override; 136 void OnProcessLaunched() override;
135 137
136 void OnProcessCrashed(int exit_code) override; 138 void OnProcessCrashed(int exit_code) override;
137 bool OnMessageReceived(const IPC::Message& msg) override; 139 bool OnMessageReceived(const IPC::Message& msg) override;
138 void OnChannelConnected(int32 peer_pid) override; 140 void OnChannelConnected(int32_t peer_pid) override;
139 void OnChannelError() override; 141 void OnChannelError() override;
140 142
141 void CancelRequests(); 143 void CancelRequests();
142 144
143 // IPC message handlers. 145 // IPC message handlers.
144 void OnRendererPluginChannelCreated(const IPC::ChannelHandle& handle); 146 void OnRendererPluginChannelCreated(const IPC::ChannelHandle& handle);
145 147
146 // Handles most requests from the plugin. May be NULL. 148 // Handles most requests from the plugin. May be NULL.
147 scoped_refptr<PepperMessageFilter> filter_; 149 scoped_refptr<PepperMessageFilter> filter_;
148 150
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 public: 190 public:
189 PpapiBrokerProcessHostIterator() 191 PpapiBrokerProcessHostIterator()
190 : BrowserChildProcessHostTypeIterator< 192 : BrowserChildProcessHostTypeIterator<
191 PpapiPluginProcessHost>(PROCESS_TYPE_PPAPI_BROKER) {} 193 PpapiPluginProcessHost>(PROCESS_TYPE_PPAPI_BROKER) {}
192 }; 194 };
193 195
194 } // namespace content 196 } // namespace content
195 197
196 #endif // CONTENT_BROWSER_PPAPI_PLUGIN_PROCESS_HOST_H_ 198 #endif // CONTENT_BROWSER_PPAPI_PLUGIN_PROCESS_HOST_H_
197 199
OLDNEW
« no previous file with comments | « content/browser/power_usage_monitor_impl.cc ('k') | content/browser/ppapi_plugin_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698