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

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 8229039: Make shared memory allocation possible for all child process types. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "content/renderer/render_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 WebRuntimeFeatures::enableQuota(true); 514 WebRuntimeFeatures::enableQuota(true);
515 515
516 FOR_EACH_OBSERVER(RenderProcessObserver, observers_, WebKitInitialized()); 516 FOR_EACH_OBSERVER(RenderProcessObserver, observers_, WebKitInitialized());
517 } 517 }
518 518
519 void RenderThreadImpl::RecordUserMetrics(const std::string& action) { 519 void RenderThreadImpl::RecordUserMetrics(const std::string& action) {
520 Send(new ViewHostMsg_UserMetricsRecordAction(action)); 520 Send(new ViewHostMsg_UserMetricsRecordAction(action));
521 } 521 }
522 522
523 base::SharedMemoryHandle RenderThreadImpl::HostAllocateSharedMemoryBuffer( 523 base::SharedMemoryHandle RenderThreadImpl::HostAllocateSharedMemoryBuffer(
524 uint32 buffer_size) { 524 uint32 buffer_size) {
525 base::SharedMemoryHandle mem_handle; 525 base::SharedMemoryHandle mem_handle;
526 Send(new ViewHostMsg_AllocateSharedMemoryBuffer(buffer_size, &mem_handle)); 526 Send(new ChildProcessHostMsg_SyncAllocateSharedMemory(
527 buffer_size, &mem_handle));
527 return mem_handle; 528 return mem_handle;
528 } 529 }
529 530
530 void RenderThreadImpl::RegisterExtension(v8::Extension* extension) { 531 void RenderThreadImpl::RegisterExtension(v8::Extension* extension) {
531 WebScriptController::registerExtension(extension); 532 WebScriptController::registerExtension(extension);
532 v8_extensions_.insert(extension->name()); 533 v8_extensions_.insert(extension->name());
533 } 534 }
534 535
535 bool RenderThreadImpl::IsRegisteredExtension( 536 bool RenderThreadImpl::IsRegisteredExtension(
536 const std::string& v8_extension_name) const { 537 const std::string& v8_extension_name) const {
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 765
765 scoped_refptr<base::MessageLoopProxy> 766 scoped_refptr<base::MessageLoopProxy>
766 RenderThreadImpl::GetFileThreadMessageLoopProxy() { 767 RenderThreadImpl::GetFileThreadMessageLoopProxy() {
767 DCHECK(message_loop() == MessageLoop::current()); 768 DCHECK(message_loop() == MessageLoop::current());
768 if (!file_thread_.get()) { 769 if (!file_thread_.get()) {
769 file_thread_.reset(new base::Thread("Renderer::FILE")); 770 file_thread_.reset(new base::Thread("Renderer::FILE"));
770 file_thread_->Start(); 771 file_thread_->Start();
771 } 772 }
772 return file_thread_->message_loop_proxy(); 773 return file_thread_->message_loop_proxy();
773 } 774 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698