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/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
11 #include "base/metrics/stats_counters.h" | 11 #include "base/metrics/stats_counters.h" |
12 #include "base/string16.h" | 12 #include "base/string16.h" |
13 #include "base/string_number_conversions.h" | 13 #include "base/string_number_conversions.h" |
14 #include "base/string_util.h" | 14 #include "base/string_util.h" |
15 #include "base/sys_info.h" | 15 #include "base/sys_info.h" |
16 #include "base/time.h" | 16 #include "base/time.h" |
17 #include "base/utf_string_conversions.h" | 17 #include "base/utf_string_conversions.h" |
| 18 #include "content/browser/browser_plugin/browser_plugin_host.h" |
18 #include "content/browser/browser_plugin/old/old_browser_plugin_host.h" | 19 #include "content/browser/browser_plugin/old/old_browser_plugin_host.h" |
19 #include "content/browser/child_process_security_policy_impl.h" | 20 #include "content/browser/child_process_security_policy_impl.h" |
20 #include "content/browser/debugger/devtools_manager_impl.h" | 21 #include "content/browser/debugger/devtools_manager_impl.h" |
21 #include "content/browser/dom_storage/session_storage_namespace_impl.h" | 22 #include "content/browser/dom_storage/session_storage_namespace_impl.h" |
22 #include "content/browser/download/download_stats.h" | 23 #include "content/browser/download/download_stats.h" |
23 #include "content/browser/download/mhtml_generation_manager.h" | 24 #include "content/browser/download/mhtml_generation_manager.h" |
24 #include "content/browser/download/save_package.h" | 25 #include "content/browser/download/save_package.h" |
25 #include "content/browser/gpu/gpu_data_manager_impl.h" | 26 #include "content/browser/gpu/gpu_data_manager_impl.h" |
26 #include "content/browser/gpu/gpu_process_host.h" | 27 #include "content/browser/gpu/gpu_process_host.h" |
27 #include "content/browser/host_zoom_map_impl.h" | 28 #include "content/browser/host_zoom_map_impl.h" |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 registrar_.Add(this, | 369 registrar_.Add(this, |
369 content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, | 370 content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, |
370 content::NotificationService::AllBrowserContextsAndSources()); | 371 content::NotificationService::AllBrowserContextsAndSources()); |
371 | 372 |
372 #if defined(ENABLE_JAVA_BRIDGE) | 373 #if defined(ENABLE_JAVA_BRIDGE) |
373 java_bridge_dispatcher_host_manager_.reset( | 374 java_bridge_dispatcher_host_manager_.reset( |
374 new JavaBridgeDispatcherHostManager(this)); | 375 new JavaBridgeDispatcherHostManager(this)); |
375 #endif | 376 #endif |
376 | 377 |
377 old_browser_plugin_host_.reset(new content::old::BrowserPluginHost(this)); | 378 old_browser_plugin_host_.reset(new content::old::BrowserPluginHost(this)); |
| 379 browser_plugin_host_.reset(new content::BrowserPluginHost(this)); |
378 } | 380 } |
379 | 381 |
380 WebContentsImpl::~WebContentsImpl() { | 382 WebContentsImpl::~WebContentsImpl() { |
381 is_being_destroyed_ = true; | 383 is_being_destroyed_ = true; |
382 | 384 |
383 // Clear out any JavaScript state. | 385 // Clear out any JavaScript state. |
384 if (dialog_creator_) | 386 if (dialog_creator_) |
385 dialog_creator_->ResetJavaScriptState(this); | 387 dialog_creator_->ResetJavaScriptState(this); |
386 | 388 |
387 if (color_chooser_) | 389 if (color_chooser_) |
(...skipping 2747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3135 old_browser_plugin_host()->embedder_render_process_host(); | 3137 old_browser_plugin_host()->embedder_render_process_host(); |
3136 *embedder_container_id = old_browser_plugin_host()->instance_id(); | 3138 *embedder_container_id = old_browser_plugin_host()->instance_id(); |
3137 int embedder_process_id = | 3139 int embedder_process_id = |
3138 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; | 3140 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; |
3139 if (embedder_process_id != -1) { | 3141 if (embedder_process_id != -1) { |
3140 *embedder_channel_name = | 3142 *embedder_channel_name = |
3141 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), | 3143 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), |
3142 embedder_process_id); | 3144 embedder_process_id); |
3143 } | 3145 } |
3144 } | 3146 } |
OLD | NEW |