OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 // Represents the browser side of the browser <--> renderer communication | 5 // Represents the browser side of the browser <--> renderer communication |
6 // channel. There will be one RenderProcessHost per renderer process. | 6 // channel. There will be one RenderProcessHost per renderer process. |
7 | 7 |
8 #include "content/browser/renderer_host/render_process_host_impl.h" | 8 #include "content/browser/renderer_host/render_process_host_impl.h" |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 21 matching lines...) Expand all Loading... |
32 #include "base/process/process_handle.h" | 32 #include "base/process/process_handle.h" |
33 #include "base/rand_util.h" | 33 #include "base/rand_util.h" |
34 #include "base/single_thread_task_runner.h" | 34 #include "base/single_thread_task_runner.h" |
35 #include "base/stl_util.h" | 35 #include "base/stl_util.h" |
36 #include "base/strings/string_number_conversions.h" | 36 #include "base/strings/string_number_conversions.h" |
37 #include "base/strings/stringprintf.h" | 37 #include "base/strings/stringprintf.h" |
38 #include "base/supports_user_data.h" | 38 #include "base/supports_user_data.h" |
39 #include "base/sys_info.h" | 39 #include "base/sys_info.h" |
40 #include "base/threading/thread.h" | 40 #include "base/threading/thread.h" |
41 #include "base/threading/thread_restrictions.h" | 41 #include "base/threading/thread_restrictions.h" |
| 42 #include "base/threading/thread_task_runner_handle.h" |
42 #include "base/trace_event/trace_event.h" | 43 #include "base/trace_event/trace_event.h" |
43 #include "base/tracked_objects.h" | 44 #include "base/tracked_objects.h" |
44 #include "build/build_config.h" | 45 #include "build/build_config.h" |
45 #include "cc/base/switches.h" | 46 #include "cc/base/switches.h" |
46 #include "components/scheduler/common/scheduler_switches.h" | 47 #include "components/scheduler/common/scheduler_switches.h" |
47 #include "components/tracing/common/tracing_switches.h" | 48 #include "components/tracing/common/tracing_switches.h" |
48 #include "content/browser/appcache/appcache_dispatcher_host.h" | 49 #include "content/browser/appcache/appcache_dispatcher_host.h" |
49 #include "content/browser/appcache/chrome_appcache_service.h" | 50 #include "content/browser/appcache/chrome_appcache_service.h" |
50 #include "content/browser/background_sync/background_sync_service_impl.h" | 51 #include "content/browser/background_sync/background_sync_service_impl.h" |
51 #include "content/browser/bad_message.h" | 52 #include "content/browser/bad_message.h" |
(...skipping 1831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1883 } | 1884 } |
1884 FOR_EACH_OBSERVER(RenderProcessHostObserver, observers_, | 1885 FOR_EACH_OBSERVER(RenderProcessHostObserver, observers_, |
1885 RenderProcessHostDestroyed(this)); | 1886 RenderProcessHostDestroyed(this)); |
1886 NotificationService::current()->Notify( | 1887 NotificationService::current()->Notify( |
1887 NOTIFICATION_RENDERER_PROCESS_TERMINATED, | 1888 NOTIFICATION_RENDERER_PROCESS_TERMINATED, |
1888 Source<RenderProcessHost>(this), NotificationService::NoDetails()); | 1889 Source<RenderProcessHost>(this), NotificationService::NoDetails()); |
1889 | 1890 |
1890 #ifndef NDEBUG | 1891 #ifndef NDEBUG |
1891 is_self_deleted_ = true; | 1892 is_self_deleted_ = true; |
1892 #endif | 1893 #endif |
1893 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); | 1894 base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this); |
1894 deleting_soon_ = true; | 1895 deleting_soon_ = true; |
1895 | 1896 |
1896 #if USE_ATTACHMENT_BROKER | 1897 #if USE_ATTACHMENT_BROKER |
1897 IPC::AttachmentBroker::GetGlobal()->DeregisterCommunicationChannel( | 1898 IPC::AttachmentBroker::GetGlobal()->DeregisterCommunicationChannel( |
1898 channel_.get()); | 1899 channel_.get()); |
1899 #endif | 1900 #endif |
1900 | 1901 |
1901 // It's important not to wait for the DeleteTask to delete the channel | 1902 // It's important not to wait for the DeleteTask to delete the channel |
1902 // proxy. Kill it off now. That way, in case the profile is going away, the | 1903 // proxy. Kill it off now. That way, in case the profile is going away, the |
1903 // rest of the objects attached to this RenderProcessHost start going | 1904 // rest of the objects attached to this RenderProcessHost start going |
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2796 | 2797 |
2797 // Skip widgets in other processes. | 2798 // Skip widgets in other processes. |
2798 if (rvh->GetProcess()->GetID() != GetID()) | 2799 if (rvh->GetProcess()->GetID() != GetID()) |
2799 continue; | 2800 continue; |
2800 | 2801 |
2801 rvh->OnWebkitPreferencesChanged(); | 2802 rvh->OnWebkitPreferencesChanged(); |
2802 } | 2803 } |
2803 } | 2804 } |
2804 | 2805 |
2805 } // namespace content | 2806 } // namespace content |
OLD | NEW |