Renderer process can allocate anonymous shared memory without help from browser process on Windows.
The browser process IO thread can be busy at startup time. This saves about 20ms to allocate the first command buffer.
Refactored so PepperPluginDelegateImpl and PrintWebViewHelper use the same function to allocate shared memory.
BUG=163215
Review URL: https://codereview.chromium.org/11469015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172748 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h
index 4a076a3..b1b24458 100644
--- a/content/renderer/render_thread_impl.h
+++ b/content/renderer/render_thread_impl.h
@@ -117,7 +117,7 @@
virtual void WidgetRestored() OVERRIDE;
virtual void EnsureWebKitInitialized() OVERRIDE;
virtual void RecordUserMetrics(const std::string& action) OVERRIDE;
- virtual base::SharedMemoryHandle HostAllocateSharedMemoryBuffer(
+ virtual scoped_ptr<base::SharedMemory> HostAllocateSharedMemoryBuffer(
uint32 buffer_size) OVERRIDE;
virtual void RegisterExtension(v8::Extension* extension) OVERRIDE;
virtual void ScheduleIdleHandler(int64 initial_delay_ms) OVERRIDE;