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

Side by Side Diff: content/browser/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
« no previous file with comments | « content/browser/plugin_loader_posix_unittest.cc ('k') | content/browser/plugin_process_host.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_BROWSER_PLUGIN_PROCESS_HOST_H_ 5 #ifndef CONTENT_BROWSER_PLUGIN_PROCESS_HOST_H_
6 #define CONTENT_BROWSER_PLUGIN_PROCESS_HOST_H_ 6 #define CONTENT_BROWSER_PLUGIN_PROCESS_HOST_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 #include <stdint.h>
11
10 #include <list> 12 #include <list>
11 #include <map> 13 #include <map>
12 #include <set> 14 #include <set>
13 #include <string> 15 #include <string>
14 #include <vector> 16 #include <vector>
15 17
16 #include "base/basictypes.h"
17 #include "base/compiler_specific.h" 18 #include "base/compiler_specific.h"
19 #include "base/macros.h"
18 #include "base/memory/ref_counted.h" 20 #include "base/memory/ref_counted.h"
19 #include "base/process/process_handle.h" 21 #include "base/process/process_handle.h"
20 #include "content/common/content_export.h" 22 #include "content/common/content_export.h"
21 #include "content/public/browser/browser_child_process_host_delegate.h" 23 #include "content/public/browser/browser_child_process_host_delegate.h"
22 #include "content/public/browser/browser_child_process_host_iterator.h" 24 #include "content/public/browser/browser_child_process_host_iterator.h"
23 #include "content/public/common/process_type.h" 25 #include "content/public/common/process_type.h"
24 #include "content/public/common/resource_type.h" 26 #include "content/public/common/resource_type.h"
25 #include "content/public/common/webplugininfo.h" 27 #include "content/public/common/webplugininfo.h"
26 #include "ipc/ipc_channel_proxy.h" 28 #include "ipc/ipc_channel_proxy.h"
27 #include "ui/gfx/native_widget_types.h" 29 #include "ui/gfx/native_widget_types.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 bool Send(IPC::Message* message) override; 83 bool Send(IPC::Message* message) override;
82 84
83 // Initialize the new plugin process, returning true on success. This must 85 // Initialize the new plugin process, returning true on success. This must
84 // be called before the object can be used. 86 // be called before the object can be used.
85 bool Init(const WebPluginInfo& info); 87 bool Init(const WebPluginInfo& info);
86 88
87 // Force the plugin process to shutdown (cleanly). 89 // Force the plugin process to shutdown (cleanly).
88 void ForceShutdown(); 90 void ForceShutdown();
89 91
90 bool OnMessageReceived(const IPC::Message& msg) override; 92 bool OnMessageReceived(const IPC::Message& msg) override;
91 void OnChannelConnected(int32 peer_pid) override; 93 void OnChannelConnected(int32_t peer_pid) override;
92 void OnChannelError() override; 94 void OnChannelError() override;
93 95
94 // Tells the plugin process to create a new channel for communication with a 96 // Tells the plugin process to create a new channel for communication with a
95 // renderer. When the plugin process responds with the channel name, 97 // renderer. When the plugin process responds with the channel name,
96 // OnChannelOpened in the client is called. 98 // OnChannelOpened in the client is called.
97 void OpenChannelToPlugin(Client* client); 99 void OpenChannelToPlugin(Client* client);
98 100
99 // This function is called to cancel pending requests to open new channels. 101 // This function is called to cancel pending requests to open new channels.
100 void CancelPendingRequest(Client* client); 102 void CancelPendingRequest(Client* client);
101 103
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 136
135 // Message handlers. 137 // Message handlers.
136 void OnChannelCreated(const IPC::ChannelHandle& channel_handle); 138 void OnChannelCreated(const IPC::ChannelHandle& channel_handle);
137 void OnChannelDestroyed(int renderer_id); 139 void OnChannelDestroyed(int renderer_id);
138 140
139 #if defined(OS_WIN) 141 #if defined(OS_WIN)
140 void OnPluginWindowDestroyed(HWND window, HWND parent); 142 void OnPluginWindowDestroyed(HWND window, HWND parent);
141 #endif 143 #endif
142 144
143 #if defined(OS_MACOSX) 145 #if defined(OS_MACOSX)
144 void OnPluginShowWindow(uint32 window_id, gfx::Rect window_rect, 146 void OnPluginShowWindow(uint32_t window_id,
147 gfx::Rect window_rect,
145 bool modal); 148 bool modal);
146 void OnPluginHideWindow(uint32 window_id, gfx::Rect window_rect); 149 void OnPluginHideWindow(uint32_t window_id, gfx::Rect window_rect);
147 void OnPluginSetCursorVisibility(bool visible); 150 void OnPluginSetCursorVisibility(bool visible);
148 #endif 151 #endif
149 152
150 bool CanShutdown() override; 153 bool CanShutdown() override;
151 void OnProcessCrashed(int exit_code) override; 154 void OnProcessCrashed(int exit_code) override;
152 155
153 void CancelRequests(); 156 void CancelRequests();
154 157
155 // Callback for ResourceMessageFilter. 158 // Callback for ResourceMessageFilter.
156 void GetContexts(ResourceType resource_type, 159 void GetContexts(ResourceType resource_type,
(...skipping 14 matching lines...) Expand all
171 174
172 // The pid of the plugin process. 175 // The pid of the plugin process.
173 int pid_; 176 int pid_;
174 177
175 #if defined(OS_WIN) 178 #if defined(OS_WIN)
176 // Tracks plugin parent windows created on the UI thread. 179 // Tracks plugin parent windows created on the UI thread.
177 std::set<HWND> plugin_parent_windows_set_; 180 std::set<HWND> plugin_parent_windows_set_;
178 #endif 181 #endif
179 #if defined(OS_MACOSX) 182 #if defined(OS_MACOSX)
180 // Tracks plugin windows currently visible. 183 // Tracks plugin windows currently visible.
181 std::set<uint32> plugin_visible_windows_set_; 184 std::set<uint32_t> plugin_visible_windows_set_;
182 // Tracks full screen windows currently visible. 185 // Tracks full screen windows currently visible.
183 std::set<uint32> plugin_fullscreen_windows_set_; 186 std::set<uint32_t> plugin_fullscreen_windows_set_;
184 // Tracks modal windows currently visible. 187 // Tracks modal windows currently visible.
185 std::set<uint32> plugin_modal_windows_set_; 188 std::set<uint32_t> plugin_modal_windows_set_;
186 // Tracks the current visibility of the cursor. 189 // Tracks the current visibility of the cursor.
187 bool plugin_cursor_visible_; 190 bool plugin_cursor_visible_;
188 #endif 191 #endif
189 192
190 // Map from render_process_id to its ResourceContext. Instead of storing the 193 // Map from render_process_id to its ResourceContext. Instead of storing the
191 // raw pointer, we store the struct below. This is needed because a renderer 194 // raw pointer, we store the struct below. This is needed because a renderer
192 // process can actually have multiple IPC channels to the same plugin process, 195 // process can actually have multiple IPC channels to the same plugin process,
193 // depending on timing conditions with plugin instance creation and shutdown. 196 // depending on timing conditions with plugin instance creation and shutdown.
194 struct ResourceContextEntry { 197 struct ResourceContextEntry {
195 ResourceContext* resource_context; 198 ResourceContext* resource_context;
(...skipping 11 matching lines...) Expand all
207 : public BrowserChildProcessHostTypeIterator<PluginProcessHost> { 210 : public BrowserChildProcessHostTypeIterator<PluginProcessHost> {
208 public: 211 public:
209 PluginProcessHostIterator() 212 PluginProcessHostIterator()
210 : BrowserChildProcessHostTypeIterator<PluginProcessHost>( 213 : BrowserChildProcessHostTypeIterator<PluginProcessHost>(
211 PROCESS_TYPE_PLUGIN) {} 214 PROCESS_TYPE_PLUGIN) {}
212 }; 215 };
213 216
214 } // namespace content 217 } // namespace content
215 218
216 #endif // CONTENT_BROWSER_PLUGIN_PROCESS_HOST_H_ 219 #endif // CONTENT_BROWSER_PLUGIN_PROCESS_HOST_H_
OLDNEW
« no previous file with comments | « content/browser/plugin_loader_posix_unittest.cc ('k') | content/browser/plugin_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698