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

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

Issue 1234813004: [BlobAsync] Asynchronous Blob Construction Final Patch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@blob-protocol-change
Patch Set: added shared memory test, and fixed memory leak Created 4 years, 10 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
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 #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 <utility> 10 #include <utility>
(...skipping 15 matching lines...) Expand all
26 #include "base/strings/string16.h" 26 #include "base/strings/string16.h"
27 #include "base/strings/string_number_conversions.h" 27 #include "base/strings/string_number_conversions.h"
28 #include "base/strings/string_split.h" 28 #include "base/strings/string_split.h"
29 #include "base/strings/string_tokenizer.h" 29 #include "base/strings/string_tokenizer.h"
30 #include "base/strings/sys_string_conversions.h" 30 #include "base/strings/sys_string_conversions.h"
31 #include "base/strings/utf_string_conversions.h" 31 #include "base/strings/utf_string_conversions.h"
32 #include "base/thread_task_runner_handle.h" 32 #include "base/thread_task_runner_handle.h"
33 #include "base/threading/simple_thread.h" 33 #include "base/threading/simple_thread.h"
34 #include "base/threading/thread_local.h" 34 #include "base/threading/thread_local.h"
35 #include "base/threading/thread_restrictions.h" 35 #include "base/threading/thread_restrictions.h"
36 #include "base/trace_event/memory_dump_manager.h"
37 #include "base/trace_event/trace_event.h" 36 #include "base/trace_event/trace_event.h"
38 #include "base/values.h" 37 #include "base/values.h"
39 #include "build/build_config.h" 38 #include "build/build_config.h"
40 #include "cc/base/histograms.h" 39 #include "cc/base/histograms.h"
41 #include "cc/base/switches.h" 40 #include "cc/base/switches.h"
42 #include "cc/blink/web_external_bitmap_impl.h" 41 #include "cc/blink/web_external_bitmap_impl.h"
43 #include "cc/blink/web_layer_impl.h" 42 #include "cc/blink/web_layer_impl.h"
44 #include "cc/layers/layer_settings.h" 43 #include "cc/layers/layer_settings.h"
45 #include "cc/raster/task_graph_runner.h" 44 #include "cc/raster/task_graph_runner.h"
46 #include "cc/trees/layer_tree_host_common.h" 45 #include "cc/trees/layer_tree_host_common.h"
47 #include "cc/trees/layer_tree_settings.h" 46 #include "cc/trees/layer_tree_settings.h"
48 #include "components/scheduler/child/compositor_worker_scheduler.h" 47 #include "components/scheduler/child/compositor_worker_scheduler.h"
49 #include "components/scheduler/child/webthread_base.h" 48 #include "components/scheduler/child/webthread_base.h"
50 #include "components/scheduler/child/webthread_impl_for_worker_scheduler.h" 49 #include "components/scheduler/child/webthread_impl_for_worker_scheduler.h"
51 #include "components/scheduler/renderer/renderer_scheduler.h" 50 #include "components/scheduler/renderer/renderer_scheduler.h"
52 #include "content/child/appcache/appcache_dispatcher.h" 51 #include "content/child/appcache/appcache_dispatcher.h"
53 #include "content/child/appcache/appcache_frontend_impl.h" 52 #include "content/child/appcache/appcache_frontend_impl.h"
53 #include "content/child/blob_storage/blob_message_filter.h"
54 #include "content/child/child_discardable_shared_memory_manager.h" 54 #include "content/child/child_discardable_shared_memory_manager.h"
55 #include "content/child/child_gpu_memory_buffer_manager.h" 55 #include "content/child/child_gpu_memory_buffer_manager.h"
56 #include "content/child/child_histogram_message_filter.h" 56 #include "content/child/child_histogram_message_filter.h"
57 #include "content/child/child_resource_message_filter.h" 57 #include "content/child/child_resource_message_filter.h"
58 #include "content/child/child_shared_bitmap_manager.h" 58 #include "content/child/child_shared_bitmap_manager.h"
59 #include "content/child/content_child_helpers.h" 59 #include "content/child/content_child_helpers.h"
60 #include "content/child/db_message_filter.h" 60 #include "content/child/db_message_filter.h"
61 #include "content/child/indexed_db/indexed_db_dispatcher.h" 61 #include "content/child/indexed_db/indexed_db_dispatcher.h"
62 #include "content/child/indexed_db/indexed_db_message_filter.h" 62 #include "content/child/indexed_db/indexed_db_message_filter.h"
63 #include "content/child/npapi/npobject_util.h" 63 #include "content/child/npapi/npobject_util.h"
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 // Note: This may reorder messages from the ResourceDispatcher with respect to 670 // Note: This may reorder messages from the ResourceDispatcher with respect to
671 // other subsystems. 671 // other subsystems.
672 resource_dispatch_throttler_.reset(new ResourceDispatchThrottler( 672 resource_dispatch_throttler_.reset(new ResourceDispatchThrottler(
673 static_cast<RenderThread*>(this), renderer_scheduler_.get(), 673 static_cast<RenderThread*>(this), renderer_scheduler_.get(),
674 base::TimeDelta::FromSecondsD(kThrottledResourceRequestFlushPeriodS), 674 base::TimeDelta::FromSecondsD(kThrottledResourceRequestFlushPeriodS),
675 kMaxResourceRequestsPerFlushWhenThrottled)); 675 kMaxResourceRequestsPerFlushWhenThrottled));
676 resource_dispatcher()->set_message_sender(resource_dispatch_throttler_.get()); 676 resource_dispatcher()->set_message_sender(resource_dispatch_throttler_.get());
677 677
678 media_stream_center_ = NULL; 678 media_stream_center_ = NULL;
679 679
680 blob_message_filter_ = new BlobMessageFilter();
681 AddFilter(blob_message_filter_.get());
680 db_message_filter_ = new DBMessageFilter(); 682 db_message_filter_ = new DBMessageFilter();
681 AddFilter(db_message_filter_.get()); 683 AddFilter(db_message_filter_.get());
682 684
683 vc_manager_.reset(new VideoCaptureImplManager()); 685 vc_manager_.reset(new VideoCaptureImplManager());
684 AddFilter(vc_manager_->video_capture_message_filter()); 686 AddFilter(vc_manager_->video_capture_message_filter());
685 687
686 browser_plugin_manager_.reset(new BrowserPluginManager()); 688 browser_plugin_manager_.reset(new BrowserPluginManager());
687 AddObserver(browser_plugin_manager_.get()); 689 AddObserver(browser_plugin_manager_.get());
688 690
689 #if defined(ENABLE_WEBRTC) 691 #if defined(ENABLE_WEBRTC)
(...skipping 1481 matching lines...) Expand 10 before | Expand all | Expand 10 after
2171 } 2173 }
2172 2174
2173 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { 2175 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() {
2174 size_t erased = 2176 size_t erased =
2175 RenderThreadImpl::current()->pending_render_frame_connects_.erase( 2177 RenderThreadImpl::current()->pending_render_frame_connects_.erase(
2176 routing_id_); 2178 routing_id_);
2177 DCHECK_EQ(1u, erased); 2179 DCHECK_EQ(1u, erased);
2178 } 2180 }
2179 2181
2180 } // namespace content 2182 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698