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

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

Issue 1963293002: Replacing Indexed DB Chromium IPC with Mojo Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactoring after Passing URLRequestContextGetter. Created 4 years, 4 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
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | content/renderer/renderer_blink_platform_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 #include "content/child/appcache/appcache_dispatcher.h" 50 #include "content/child/appcache/appcache_dispatcher.h"
51 #include "content/child/appcache/appcache_frontend_impl.h" 51 #include "content/child/appcache/appcache_frontend_impl.h"
52 #include "content/child/blob_storage/blob_message_filter.h" 52 #include "content/child/blob_storage/blob_message_filter.h"
53 #include "content/child/child_discardable_shared_memory_manager.h" 53 #include "content/child/child_discardable_shared_memory_manager.h"
54 #include "content/child/child_gpu_memory_buffer_manager.h" 54 #include "content/child/child_gpu_memory_buffer_manager.h"
55 #include "content/child/child_histogram_message_filter.h" 55 #include "content/child/child_histogram_message_filter.h"
56 #include "content/child/child_resource_message_filter.h" 56 #include "content/child/child_resource_message_filter.h"
57 #include "content/child/child_shared_bitmap_manager.h" 57 #include "content/child/child_shared_bitmap_manager.h"
58 #include "content/child/content_child_helpers.h" 58 #include "content/child/content_child_helpers.h"
59 #include "content/child/db_message_filter.h" 59 #include "content/child/db_message_filter.h"
60 #include "content/child/indexed_db/indexed_db_dispatcher.h"
61 #include "content/child/indexed_db/indexed_db_message_filter.h"
62 #include "content/child/resource_dispatcher.h" 60 #include "content/child/resource_dispatcher.h"
63 #include "content/child/resource_scheduling_filter.h" 61 #include "content/child/resource_scheduling_filter.h"
64 #include "content/child/runtime_features.h" 62 #include "content/child/runtime_features.h"
65 #include "content/child/thread_safe_sender.h" 63 #include "content/child/thread_safe_sender.h"
66 #include "content/child/web_database_observer_impl.h" 64 #include "content/child/web_database_observer_impl.h"
67 #include "content/child/worker_thread_registry.h" 65 #include "content/child/worker_thread_registry.h"
68 #include "content/common/child_process_messages.h" 66 #include "content/common/child_process_messages.h"
69 #include "content/common/content_constants_internal.h" 67 #include "content/common/content_constants_internal.h"
70 #include "content/common/dom_storage/dom_storage_messages.h" 68 #include "content/common/dom_storage/dom_storage_messages.h"
71 #include "content/common/frame_messages.h" 69 #include "content/common/frame_messages.h"
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 // In single process the single process is all there is. 643 // In single process the single process is all there is.
646 webkit_shared_timer_suspended_ = false; 644 webkit_shared_timer_suspended_ = false;
647 widget_count_ = 0; 645 widget_count_ = 0;
648 hidden_widget_count_ = 0; 646 hidden_widget_count_ = 0;
649 idle_notification_delay_in_ms_ = kInitialIdleHandlerDelayMs; 647 idle_notification_delay_in_ms_ = kInitialIdleHandlerDelayMs;
650 idle_notifications_to_skip_ = 0; 648 idle_notifications_to_skip_ = 0;
651 649
652 appcache_dispatcher_.reset( 650 appcache_dispatcher_.reset(
653 new AppCacheDispatcher(Get(), new AppCacheFrontendImpl())); 651 new AppCacheDispatcher(Get(), new AppCacheFrontendImpl()));
654 dom_storage_dispatcher_.reset(new DomStorageDispatcher()); 652 dom_storage_dispatcher_.reset(new DomStorageDispatcher());
653 #if 0
655 main_thread_indexed_db_dispatcher_.reset(new IndexedDBDispatcher( 654 main_thread_indexed_db_dispatcher_.reset(new IndexedDBDispatcher(
656 thread_safe_sender())); 655 thread_safe_sender()));
656 #endif
657 main_thread_cache_storage_dispatcher_.reset( 657 main_thread_cache_storage_dispatcher_.reset(
658 new CacheStorageDispatcher(thread_safe_sender())); 658 new CacheStorageDispatcher(thread_safe_sender()));
659 embedded_worker_dispatcher_.reset(new EmbeddedWorkerDispatcher()); 659 embedded_worker_dispatcher_.reset(new EmbeddedWorkerDispatcher());
660 660
661 // Note: This may reorder messages from the ResourceDispatcher with respect to 661 // Note: This may reorder messages from the ResourceDispatcher with respect to
662 // other subsystems. 662 // other subsystems.
663 resource_dispatch_throttler_.reset(new ResourceDispatchThrottler( 663 resource_dispatch_throttler_.reset(new ResourceDispatchThrottler(
664 static_cast<RenderThread*>(this), renderer_scheduler_.get(), 664 static_cast<RenderThread*>(this), renderer_scheduler_.get(),
665 base::TimeDelta::FromSecondsD(kThrottledResourceRequestFlushPeriodS), 665 base::TimeDelta::FromSecondsD(kThrottledResourceRequestFlushPeriodS),
666 kMaxResourceRequestsPerFlushWhenThrottled)); 666 kMaxResourceRequestsPerFlushWhenThrottled));
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 698
699 audio_input_message_filter_ = new AudioInputMessageFilter(GetIOTaskRunner()); 699 audio_input_message_filter_ = new AudioInputMessageFilter(GetIOTaskRunner());
700 AddFilter(audio_input_message_filter_.get()); 700 AddFilter(audio_input_message_filter_.get());
701 701
702 audio_message_filter_ = new AudioMessageFilter(GetIOTaskRunner()); 702 audio_message_filter_ = new AudioMessageFilter(GetIOTaskRunner());
703 AddFilter(audio_message_filter_.get()); 703 AddFilter(audio_message_filter_.get());
704 704
705 midi_message_filter_ = new MidiMessageFilter(GetIOTaskRunner()); 705 midi_message_filter_ = new MidiMessageFilter(GetIOTaskRunner());
706 AddFilter(midi_message_filter_.get()); 706 AddFilter(midi_message_filter_.get());
707 707
708 #if 0
708 AddFilter((new IndexedDBMessageFilter(thread_safe_sender()))->GetFilter()); 709 AddFilter((new IndexedDBMessageFilter(thread_safe_sender()))->GetFilter());
710 #endif
709 711
710 AddFilter((new CacheStorageMessageFilter(thread_safe_sender()))->GetFilter()); 712 AddFilter((new CacheStorageMessageFilter(thread_safe_sender()))->GetFilter());
711 713
712 AddFilter((new ServiceWorkerContextMessageFilter())->GetFilter()); 714 AddFilter((new ServiceWorkerContextMessageFilter())->GetFilter());
713 715
714 #if defined(USE_AURA) 716 #if defined(USE_AURA)
715 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 717 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
716 switches::kUseMusInRenderer)) { 718 switches::kUseMusInRenderer)) {
717 CreateRenderWidgetWindowTreeClientFactory(GetMojoShellConnection()); 719 CreateRenderWidgetWindowTreeClientFactory(GetMojoShellConnection());
718 } 720 }
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
943 input_event_filter_ = nullptr; 945 input_event_filter_ = nullptr;
944 } 946 }
945 947
946 // RemoveEmbeddedWorkerRoute may be called while deleting 948 // RemoveEmbeddedWorkerRoute may be called while deleting
947 // EmbeddedWorkerDispatcher. So it must be deleted before deleting 949 // EmbeddedWorkerDispatcher. So it must be deleted before deleting
948 // RenderThreadImpl. 950 // RenderThreadImpl.
949 embedded_worker_dispatcher_.reset(); 951 embedded_worker_dispatcher_.reset();
950 952
951 // Ramp down IDB before we ramp down WebKit (and V8), since IDB classes might 953 // Ramp down IDB before we ramp down WebKit (and V8), since IDB classes might
952 // hold pointers to V8 objects (e.g., via pending requests). 954 // hold pointers to V8 objects (e.g., via pending requests).
955 #if 0
956 // TODO(cmumford): Probably need a way to do this using Mojo still.
953 main_thread_indexed_db_dispatcher_.reset(); 957 main_thread_indexed_db_dispatcher_.reset();
958 #endif
954 959
955 main_thread_compositor_task_runner_ = nullptr; 960 main_thread_compositor_task_runner_ = nullptr;
956 961
957 gpu_factories_.clear(); 962 gpu_factories_.clear();
958 963
959 // Context providers must be released prior to destroying the GPU channel. 964 // Context providers must be released prior to destroying the GPU channel.
960 shared_worker_context_provider_ = nullptr; 965 shared_worker_context_provider_ = nullptr;
961 shared_main_thread_contexts_ = nullptr; 966 shared_main_thread_contexts_ = nullptr;
962 967
963 if (gpu_channel_.get()) 968 if (gpu_channel_.get())
(...skipping 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after
2229 v8_memory_pressure_level == v8::MemoryPressureLevel::kCritical) 2234 v8_memory_pressure_level == v8::MemoryPressureLevel::kCritical)
2230 v8_memory_pressure_level = v8::MemoryPressureLevel::kModerate; 2235 v8_memory_pressure_level = v8::MemoryPressureLevel::kModerate;
2231 2236
2232 blink::mainThreadIsolate()->MemoryPressureNotification( 2237 blink::mainThreadIsolate()->MemoryPressureNotification(
2233 v8_memory_pressure_level); 2238 v8_memory_pressure_level);
2234 blink::MemoryPressureNotificationToWorkerThreadIsolates( 2239 blink::MemoryPressureNotificationToWorkerThreadIsolates(
2235 v8_memory_pressure_level); 2240 v8_memory_pressure_level);
2236 } 2241 }
2237 2242
2238 } // namespace content 2243 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | content/renderer/renderer_blink_platform_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698