Chromium Code Reviews| 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/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| 11 #include "base/lazy_instance.h" | 11 #include "base/lazy_instance.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/metrics/histogram.h" | 13 #include "base/metrics/histogram.h" |
| 14 #include "base/metrics/stats_counters.h" | 14 #include "base/metrics/stats_counters.h" |
| 15 #include "base/process/process.h" | 15 #include "base/process/process.h" |
| 16 #include "base/strings/string16.h" | 16 #include "base/strings/string16.h" |
| 17 #include "base/strings/string_number_conversions.h" | 17 #include "base/strings/string_number_conversions.h" |
| 18 #include "base/strings/string_util.h" | 18 #include "base/strings/string_util.h" |
| 19 #include "base/strings/utf_string_conversions.h" | 19 #include "base/strings/utf_string_conversions.h" |
| 20 #include "base/time/time.h" | 20 #include "base/time/time.h" |
| 21 #include "content/browser/accessibility/accessibility_mode_helper.h" | 21 #include "content/browser/accessibility/accessibility_mode_helper.h" |
| 22 #include "content/browser/accessibility/browser_accessibility_state_impl.h" | 22 #include "content/browser/accessibility/browser_accessibility_state_impl.h" |
| 23 #include "content/browser/browser_plugin/browser_plugin_embedder.h" | 23 #include "content/browser/browser_plugin/browser_plugin_embedder.h" |
| 24 #include "content/browser/browser_plugin/browser_plugin_guest.h" | 24 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
| 25 #include "content/browser/child_process_security_policy_impl.h" | 25 #include "content/browser/child_process_security_policy_impl.h" |
| 26 #include "content/browser/devtools/devtools_manager.h" | 26 #include "content/browser/devtools/devtools_manager.h" |
| 27 #include "content/browser/devtools/render_view_devtools_agent_host.h" | |
| 27 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" | 28 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" |
| 28 #include "content/browser/dom_storage/session_storage_namespace_impl.h" | 29 #include "content/browser/dom_storage/session_storage_namespace_impl.h" |
| 29 #include "content/browser/download/download_stats.h" | 30 #include "content/browser/download/download_stats.h" |
| 30 #include "content/browser/download/mhtml_generation_manager.h" | 31 #include "content/browser/download/mhtml_generation_manager.h" |
| 31 #include "content/browser/download/save_package.h" | 32 #include "content/browser/download/save_package.h" |
| 32 #include "content/browser/frame_host/cross_process_frame_connector.h" | 33 #include "content/browser/frame_host/cross_process_frame_connector.h" |
| 33 #include "content/browser/frame_host/interstitial_page_impl.h" | 34 #include "content/browser/frame_host/interstitial_page_impl.h" |
| 34 #include "content/browser/frame_host/navigation_entry_impl.h" | 35 #include "content/browser/frame_host/navigation_entry_impl.h" |
| 35 #include "content/browser/frame_host/navigator_impl.h" | 36 #include "content/browser/frame_host/navigator_impl.h" |
| 36 #include "content/browser/frame_host/render_frame_host_impl.h" | 37 #include "content/browser/frame_host/render_frame_host_impl.h" |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 479 return true; | 480 return true; |
| 480 } else { | 481 } else { |
| 481 while ((observer = it.GetNext()) != NULL) | 482 while ((observer = it.GetNext()) != NULL) |
| 482 if (observer->OnMessageReceived(message)) | 483 if (observer->OnMessageReceived(message)) |
| 483 return true; | 484 return true; |
| 484 } | 485 } |
| 485 | 486 |
| 486 // Message handlers should be aware of which | 487 // Message handlers should be aware of which |
| 487 // RenderViewHost/RenderFrameHost sent the message, which is temporarily | 488 // RenderViewHost/RenderFrameHost sent the message, which is temporarily |
| 488 // stored in render_(view|frame)_message_source_. | 489 // stored in render_(view|frame)_message_source_. |
| 489 if (render_frame_host) | 490 if (render_frame_host) { |
| 491 if (RenderViewDevToolsAgentHost::DispatchIPCMessage( | |
|
Charlie Reis
2014/11/20 23:11:10
I don't think we should be adding this here; it do
yurys
2014/11/21 08:14:14
This's just where it was before crrev.com/288297.
Charlie Reis
2014/11/22 00:38:17
Ah, I didn't realize it was here before. I'm hesi
| |
| 492 render_frame_host->GetRenderViewHost(), message)) | |
| 493 return true; | |
| 490 render_frame_message_source_ = render_frame_host; | 494 render_frame_message_source_ = render_frame_host; |
| 491 else | 495 } else { |
| 496 if (RenderViewDevToolsAgentHost::DispatchIPCMessage(render_view_host, | |
| 497 message)) | |
| 498 return true; | |
| 492 render_view_message_source_ = render_view_host; | 499 render_view_message_source_ = render_view_host; |
| 500 } | |
| 493 | 501 |
| 494 bool handled = true; | 502 bool handled = true; |
| 495 IPC_BEGIN_MESSAGE_MAP(WebContentsImpl, message) | 503 IPC_BEGIN_MESSAGE_MAP(WebContentsImpl, message) |
| 496 IPC_MESSAGE_HANDLER(FrameHostMsg_DomOperationResponse, | 504 IPC_MESSAGE_HANDLER(FrameHostMsg_DomOperationResponse, |
| 497 OnDomOperationResponse) | 505 OnDomOperationResponse) |
| 498 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeThemeColor, | 506 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeThemeColor, |
| 499 OnThemeColorChanged) | 507 OnThemeColorChanged) |
| 500 IPC_MESSAGE_HANDLER(FrameHostMsg_DidFinishDocumentLoad, | 508 IPC_MESSAGE_HANDLER(FrameHostMsg_DidFinishDocumentLoad, |
| 501 OnDocumentLoadedInFrame) | 509 OnDocumentLoadedInFrame) |
| 502 IPC_MESSAGE_HANDLER(FrameHostMsg_DidFinishLoad, OnDidFinishLoad) | 510 IPC_MESSAGE_HANDLER(FrameHostMsg_DidFinishLoad, OnDidFinishLoad) |
| (...skipping 3849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4352 node->render_manager()->ResumeResponseDeferredAtStart(); | 4360 node->render_manager()->ResumeResponseDeferredAtStart(); |
| 4353 } | 4361 } |
| 4354 | 4362 |
| 4355 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4363 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
| 4356 force_disable_overscroll_content_ = force_disable; | 4364 force_disable_overscroll_content_ = force_disable; |
| 4357 if (view_) | 4365 if (view_) |
| 4358 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4366 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
| 4359 } | 4367 } |
| 4360 | 4368 |
| 4361 } // namespace content | 4369 } // namespace content |
| OLD | NEW |