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

Side by Side Diff: content/browser/browser_main_loop.cc

Issue 2717213004: Move SharedBitmapManager implementation out of content/ (Closed)
Patch Set: Add ipc task runner Created 3 years, 8 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/browser/browser_main_loop.h" 5 #include "content/browser/browser_main_loop.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 27 matching lines...) Expand all
38 #include "base/task_scheduler/task_traits.h" 38 #include "base/task_scheduler/task_traits.h"
39 #include "base/threading/sequenced_worker_pool.h" 39 #include "base/threading/sequenced_worker_pool.h"
40 #include "base/threading/thread_restrictions.h" 40 #include "base/threading/thread_restrictions.h"
41 #include "base/threading/thread_task_runner_handle.h" 41 #include "base/threading/thread_task_runner_handle.h"
42 #include "base/time/time.h" 42 #include "base/time/time.h"
43 #include "base/timer/hi_res_timer_manager.h" 43 #include "base/timer/hi_res_timer_manager.h"
44 #include "base/trace_event/memory_dump_manager.h" 44 #include "base/trace_event/memory_dump_manager.h"
45 #include "base/trace_event/trace_event.h" 45 #include "base/trace_event/trace_event.h"
46 #include "build/build_config.h" 46 #include "build/build_config.h"
47 #include "components/discardable_memory/service/discardable_shared_memory_manage r.h" 47 #include "components/discardable_memory/service/discardable_shared_memory_manage r.h"
48 #include "components/display_compositor/host_shared_bitmap_manager.h"
48 #include "components/tracing/common/process_metrics_memory_dump_provider.h" 49 #include "components/tracing/common/process_metrics_memory_dump_provider.h"
49 #include "components/tracing/common/trace_config_file.h" 50 #include "components/tracing/common/trace_config_file.h"
50 #include "components/tracing/common/trace_to_console.h" 51 #include "components/tracing/common/trace_to_console.h"
51 #include "components/tracing/common/tracing_switches.h" 52 #include "components/tracing/common/tracing_switches.h"
52 #include "content/browser/audio_manager_thread.h" 53 #include "content/browser/audio_manager_thread.h"
53 #include "content/browser/browser_thread_impl.h" 54 #include "content/browser/browser_thread_impl.h"
54 #include "content/browser/dom_storage/dom_storage_area.h" 55 #include "content/browser/dom_storage/dom_storage_area.h"
55 #include "content/browser/download/download_resource_handler.h" 56 #include "content/browser/download/download_resource_handler.h"
56 #include "content/browser/download/save_file_manager.h" 57 #include "content/browser/download/save_file_manager.h"
57 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" 58 #include "content/browser/gpu/browser_gpu_channel_host_factory.h"
(...skipping 12 matching lines...) Expand all
70 #include "content/browser/net/browser_online_state_observer.h" 71 #include "content/browser/net/browser_online_state_observer.h"
71 #include "content/browser/renderer_host/media/media_stream_manager.h" 72 #include "content/browser/renderer_host/media/media_stream_manager.h"
72 #include "content/browser/renderer_host/render_process_host_impl.h" 73 #include "content/browser/renderer_host/render_process_host_impl.h"
73 #include "content/browser/service_manager/service_manager_context.h" 74 #include "content/browser/service_manager/service_manager_context.h"
74 #include "content/browser/speech/speech_recognition_manager_impl.h" 75 #include "content/browser/speech/speech_recognition_manager_impl.h"
75 #include "content/browser/startup_task_runner.h" 76 #include "content/browser/startup_task_runner.h"
76 #include "content/browser/utility_process_host_impl.h" 77 #include "content/browser/utility_process_host_impl.h"
77 #include "content/browser/webui/content_web_ui_controller_factory.h" 78 #include "content/browser/webui/content_web_ui_controller_factory.h"
78 #include "content/browser/webui/url_data_manager.h" 79 #include "content/browser/webui/url_data_manager.h"
79 #include "content/common/content_switches_internal.h" 80 #include "content/common/content_switches_internal.h"
80 #include "content/common/host_shared_bitmap_manager.h"
81 #include "content/common/service_manager/service_manager_connection_impl.h" 81 #include "content/common/service_manager/service_manager_connection_impl.h"
82 #include "content/public/browser/browser_main_parts.h" 82 #include "content/public/browser/browser_main_parts.h"
83 #include "content/public/browser/content_browser_client.h" 83 #include "content/public/browser/content_browser_client.h"
84 #include "content/public/browser/gpu_data_manager_observer.h" 84 #include "content/public/browser/gpu_data_manager_observer.h"
85 #include "content/public/browser/render_process_host.h" 85 #include "content/public/browser/render_process_host.h"
86 #include "content/public/browser/tracing_controller.h" 86 #include "content/public/browser/tracing_controller.h"
87 #include "content/public/common/content_client.h" 87 #include "content/public/common/content_client.h"
88 #include "content/public/common/content_features.h" 88 #include "content/public/common/content_features.h"
89 #include "content/public/common/content_switches.h" 89 #include "content/public/common/content_switches.h"
90 #include "content/public/common/main_function_params.h" 90 #include "content/public/common/main_function_params.h"
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 // in BrowserMainLoop::ShutdownThreadsAndCleanupIO. 795 // in BrowserMainLoop::ShutdownThreadsAndCleanupIO.
796 memory_instrumentation_coordinator_ = 796 memory_instrumentation_coordinator_ =
797 base::MakeUnique<memory_instrumentation::CoordinatorImpl>( 797 base::MakeUnique<memory_instrumentation::CoordinatorImpl>(
798 true /* initialize_memory_dump_manager */); 798 true /* initialize_memory_dump_manager */);
799 799
800 // Enable memory-infra dump providers. 800 // Enable memory-infra dump providers.
801 InitSkiaEventTracer(); 801 InitSkiaEventTracer();
802 tracing::ProcessMetricsMemoryDumpProvider::RegisterForProcess( 802 tracing::ProcessMetricsMemoryDumpProvider::RegisterForProcess(
803 base::kNullProcessId); 803 base::kNullProcessId);
804 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( 804 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
805 HostSharedBitmapManager::current(), "HostSharedBitmapManager", nullptr); 805 display_compositor::HostSharedBitmapManager::current(),
806 "display_compositor::HostSharedBitmapManager", nullptr);
806 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( 807 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
807 skia::SkiaMemoryDumpProvider::GetInstance(), "Skia", nullptr); 808 skia::SkiaMemoryDumpProvider::GetInstance(), "Skia", nullptr);
808 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( 809 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
809 sql::SqlMemoryDumpProvider::GetInstance(), "Sql", nullptr); 810 sql::SqlMemoryDumpProvider::GetInstance(), "Sql", nullptr);
810 } 811 }
811 812
812 int BrowserMainLoop::PreCreateThreads() { 813 int BrowserMainLoop::PreCreateThreads() {
813 // SequencedWorkerPool shouldn't be enabled yet. It should be enabled below by 814 // SequencedWorkerPool shouldn't be enabled yet. It should be enabled below by
814 // either |parts_|->PreCreateThreads() or 815 // either |parts_|->PreCreateThreads() or
815 // base::SequencedWorkerPool::EnableForProcess(). 816 // base::SequencedWorkerPool::EnableForProcess().
(...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after
1754 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), 1755 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE),
1755 MediaInternals::GetInstance()); 1756 MediaInternals::GetInstance());
1756 } 1757 }
1757 CHECK(audio_manager_); 1758 CHECK(audio_manager_);
1758 1759
1759 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get()); 1760 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get());
1760 CHECK(audio_system_); 1761 CHECK(audio_system_);
1761 } 1762 }
1762 1763
1763 } // namespace content 1764 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698