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

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

Issue 8566026: Implement skia sandbox callback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix errors in checkin Created 9 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 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #include "content/renderer/indexed_db_dispatcher.h" 45 #include "content/renderer/indexed_db_dispatcher.h"
46 #include "content/renderer/media/audio_input_message_filter.h" 46 #include "content/renderer/media/audio_input_message_filter.h"
47 #include "content/renderer/media/audio_message_filter.h" 47 #include "content/renderer/media/audio_message_filter.h"
48 #include "content/renderer/media/video_capture_impl_manager.h" 48 #include "content/renderer/media/video_capture_impl_manager.h"
49 #include "content/renderer/media/video_capture_message_filter.h" 49 #include "content/renderer/media/video_capture_message_filter.h"
50 #include "content/renderer/plugin_channel_host.h" 50 #include "content/renderer/plugin_channel_host.h"
51 #include "content/renderer/render_process_impl.h" 51 #include "content/renderer/render_process_impl.h"
52 #include "content/renderer/render_view_impl.h" 52 #include "content/renderer/render_view_impl.h"
53 #include "content/renderer/renderer_webidbfactory_impl.h" 53 #include "content/renderer/renderer_webidbfactory_impl.h"
54 #include "content/renderer/renderer_webkitplatformsupport_impl.h" 54 #include "content/renderer/renderer_webkitplatformsupport_impl.h"
55 #include "content/renderer/skia_sandbox_support_impl.h"
55 #include "ipc/ipc_channel_handle.h" 56 #include "ipc/ipc_channel_handle.h"
56 #include "ipc/ipc_platform_file.h" 57 #include "ipc/ipc_platform_file.h"
57 #include "net/base/net_errors.h" 58 #include "net/base/net_errors.h"
58 #include "net/base/net_util.h" 59 #include "net/base/net_util.h"
59 #include "third_party/tcmalloc/chromium/src/google/malloc_extension.h" 60 #include "third_party/tcmalloc/chromium/src/google/malloc_extension.h"
60 #include "third_party/WebKit/Source/WebKit/chromium/public/WebColor.h" 61 #include "third_party/WebKit/Source/WebKit/chromium/public/WebColor.h"
61 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabase.h" 62 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabase.h"
62 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" 63 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
63 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" 64 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
64 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" 65 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 518
518 WebRuntimeFeatures::enableFileSystem( 519 WebRuntimeFeatures::enableFileSystem(
519 !command_line.HasSwitch(switches::kDisableFileSystem)); 520 !command_line.HasSwitch(switches::kDisableFileSystem));
520 521
521 WebRuntimeFeatures::enableJavaScriptI18NAPI( 522 WebRuntimeFeatures::enableJavaScriptI18NAPI(
522 !command_line.HasSwitch(switches::kDisableJavaScriptI18NAPI)); 523 !command_line.HasSwitch(switches::kDisableJavaScriptI18NAPI));
523 524
524 WebRuntimeFeatures::enableQuota(true); 525 WebRuntimeFeatures::enableQuota(true);
525 526
526 FOR_EACH_OBSERVER(RenderProcessObserver, observers_, WebKitInitialized()); 527 FOR_EACH_OBSERVER(RenderProcessObserver, observers_, WebKitInitialized());
528
529 #if defined(OS_WIN) && defined(USE_SKIA)
530 // Make sure skia has its sandbox support
vandebo (ex-Chrome) 2011/11/18 21:35:18 We should figure out if this is guaranteed to run
arthurhsu 2011/11/22 00:56:23 Updated to do the init once in platform init secti
531 SkiaSandboxSupport::GetInstance();
532 #endif
527 } 533 }
528 534
529 void RenderThreadImpl::RecordUserMetrics(const std::string& action) { 535 void RenderThreadImpl::RecordUserMetrics(const std::string& action) {
530 Send(new ViewHostMsg_UserMetricsRecordAction(action)); 536 Send(new ViewHostMsg_UserMetricsRecordAction(action));
531 } 537 }
532 538
533 base::SharedMemoryHandle RenderThreadImpl::HostAllocateSharedMemoryBuffer( 539 base::SharedMemoryHandle RenderThreadImpl::HostAllocateSharedMemoryBuffer(
534 uint32 buffer_size) { 540 uint32 buffer_size) {
535 base::SharedMemoryHandle mem_handle; 541 base::SharedMemoryHandle mem_handle;
536 Send(new ChildProcessHostMsg_SyncAllocateSharedMemory( 542 Send(new ChildProcessHostMsg_SyncAllocateSharedMemory(
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 791
786 scoped_refptr<base::MessageLoopProxy> 792 scoped_refptr<base::MessageLoopProxy>
787 RenderThreadImpl::GetFileThreadMessageLoopProxy() { 793 RenderThreadImpl::GetFileThreadMessageLoopProxy() {
788 DCHECK(message_loop() == MessageLoop::current()); 794 DCHECK(message_loop() == MessageLoop::current());
789 if (!file_thread_.get()) { 795 if (!file_thread_.get()) {
790 file_thread_.reset(new base::Thread("Renderer::FILE")); 796 file_thread_.reset(new base::Thread("Renderer::FILE"));
791 file_thread_->Start(); 797 file_thread_->Start();
792 } 798 }
793 return file_thread_->message_loop_proxy(); 799 return file_thread_->message_loop_proxy();
794 } 800 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698