OLD | NEW |
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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 #include "content/browser/time_zone_monitor.h" | 66 #include "content/browser/time_zone_monitor.h" |
67 #include "content/browser/utility_process_host_impl.h" | 67 #include "content/browser/utility_process_host_impl.h" |
68 #include "content/browser/webui/content_web_ui_controller_factory.h" | 68 #include "content/browser/webui/content_web_ui_controller_factory.h" |
69 #include "content/browser/webui/url_data_manager.h" | 69 #include "content/browser/webui/url_data_manager.h" |
70 #include "content/common/content_switches_internal.h" | 70 #include "content/common/content_switches_internal.h" |
71 #include "content/common/host_discardable_shared_memory_manager.h" | 71 #include "content/common/host_discardable_shared_memory_manager.h" |
72 #include "content/common/host_shared_bitmap_manager.h" | 72 #include "content/common/host_shared_bitmap_manager.h" |
73 #include "content/common/mojo/mojo_shell_connection_impl.h" | 73 #include "content/common/mojo/mojo_shell_connection_impl.h" |
74 #include "content/public/browser/browser_main_parts.h" | 74 #include "content/public/browser/browser_main_parts.h" |
75 #include "content/public/browser/content_browser_client.h" | 75 #include "content/public/browser/content_browser_client.h" |
| 76 #include "content/public/browser/geolocation_provider.h" |
76 #include "content/public/browser/render_process_host.h" | 77 #include "content/public/browser/render_process_host.h" |
77 #include "content/public/browser/tracing_controller.h" | 78 #include "content/public/browser/tracing_controller.h" |
78 #include "content/public/common/content_client.h" | 79 #include "content/public/common/content_client.h" |
79 #include "content/public/common/content_switches.h" | 80 #include "content/public/common/content_switches.h" |
80 #include "content/public/common/main_function_params.h" | 81 #include "content/public/common/main_function_params.h" |
81 #include "content/public/common/result_codes.h" | 82 #include "content/public/common/result_codes.h" |
82 #include "device/battery/battery_status_service.h" | 83 #include "device/battery/battery_status_service.h" |
83 #include "media/base/media.h" | 84 #include "media/base/media.h" |
84 #include "media/base/user_input_monitor.h" | 85 #include "media/base/user_input_monitor.h" |
85 #include "media/midi/midi_manager.h" | 86 #include "media/midi/midi_manager.h" |
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
674 base::MessageLoop::current()->AddTaskObserver(memory_observer_.get()); | 675 base::MessageLoop::current()->AddTaskObserver(memory_observer_.get()); |
675 } | 676 } |
676 | 677 |
677 if (parsed_command_line_.HasSwitch( | 678 if (parsed_command_line_.HasSwitch( |
678 switches::kEnableAggressiveDOMStorageFlushing)) { | 679 switches::kEnableAggressiveDOMStorageFlushing)) { |
679 TRACE_EVENT0("startup", | 680 TRACE_EVENT0("startup", |
680 "BrowserMainLoop::Subsystem:EnableAggressiveCommitDelay"); | 681 "BrowserMainLoop::Subsystem:EnableAggressiveCommitDelay"); |
681 DOMStorageArea::EnableAggressiveCommitDelay(); | 682 DOMStorageArea::EnableAggressiveCommitDelay(); |
682 } | 683 } |
683 | 684 |
| 685 GeolocationProvider::SetGeolocationDelegate( |
| 686 GetContentClient()->browser()->CreateGeolocationDelegate()); |
| 687 |
684 // Enable memory-infra dump providers. | 688 // Enable memory-infra dump providers. |
685 InitSkiaEventTracer(); | 689 InitSkiaEventTracer(); |
686 tracing::ProcessMetricsMemoryDumpProvider::RegisterForProcess( | 690 tracing::ProcessMetricsMemoryDumpProvider::RegisterForProcess( |
687 base::kNullProcessId); | 691 base::kNullProcessId); |
688 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( | 692 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
689 HostSharedBitmapManager::current(), "HostSharedBitmapManager", nullptr); | 693 HostSharedBitmapManager::current(), "HostSharedBitmapManager", nullptr); |
690 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( | 694 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
691 skia::SkiaMemoryDumpProvider::GetInstance(), "Skia", nullptr); | 695 skia::SkiaMemoryDumpProvider::GetInstance(), "Skia", nullptr); |
692 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( | 696 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
693 sql::SqlMemoryDumpProvider::GetInstance(), "Sql", nullptr); | 697 sql::SqlMemoryDumpProvider::GetInstance(), "Sql", nullptr); |
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1519 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner = | 1523 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner = |
1520 audio_thread_->task_runner(); | 1524 audio_thread_->task_runner(); |
1521 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner), | 1525 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner), |
1522 std::move(worker_task_runner), | 1526 std::move(worker_task_runner), |
1523 MediaInternals::GetInstance()); | 1527 MediaInternals::GetInstance()); |
1524 } | 1528 } |
1525 CHECK(audio_manager_); | 1529 CHECK(audio_manager_); |
1526 } | 1530 } |
1527 | 1531 |
1528 } // namespace content | 1532 } // namespace content |
OLD | NEW |