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

Unified Diff: chrome/plugin/webplugin_delegate_stub.cc

Issue 10895: Add Terminate() to the Process object, have RenderProcessHost use this to avo... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/plugin/webplugin_delegate_stub.h ('k') | chrome/plugin/webplugin_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/plugin/webplugin_delegate_stub.cc
===================================================================
--- chrome/plugin/webplugin_delegate_stub.cc (revision 5371)
+++ chrome/plugin/webplugin_delegate_stub.cc (working copy)
@@ -226,7 +226,7 @@
size_t size = emf.GetDataSize();
DCHECK(size);
params->size = size;
- SharedMemory shared_buf;
+ base::SharedMemory shared_buf;
CreateSharedBuffer(size, &shared_buf, &params->shared_memory);
// Retrieve a copy of the data.
@@ -239,8 +239,8 @@
const gfx::Rect& clip_rect,
const std::vector<gfx::Rect>& cutout_rects,
bool visible,
- const SharedMemoryHandle& windowless_buffer,
- const SharedMemoryHandle& background_buffer) {
+ const base::SharedMemoryHandle& windowless_buffer,
+ const base::SharedMemoryHandle& background_buffer) {
webplugin_->UpdateGeometry(
window_rect, clip_rect, cutout_rects, visible, windowless_buffer,
background_buffer);
@@ -301,8 +301,8 @@
void WebPluginDelegateStub::CreateSharedBuffer(
size_t size,
- SharedMemory* shared_buf,
- SharedMemoryHandle* remote_handle) {
+ base::SharedMemory* shared_buf,
+ base::SharedMemoryHandle* remote_handle) {
if (!shared_buf->Create(std::wstring(), false, false, size)) {
NOTREACHED();
return;
@@ -319,6 +319,7 @@
remote_handle, 0, FALSE,
DUPLICATE_SAME_ACCESS);
DCHECK_NE(result, 0);
+
// If the calling function's shared_buf is on the stack, its destructor will
// close the shared memory buffer handle. This is fine since we already
// duplicated the handle to the renderer process so it will stay "alive".
« no previous file with comments | « chrome/plugin/webplugin_delegate_stub.h ('k') | chrome/plugin/webplugin_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698