| 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/lazy_instance.h" | 10 #include "base/lazy_instance.h" | 
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 55 #include "content/browser/webui/web_ui_controller_factory_registry.h" | 55 #include "content/browser/webui/web_ui_controller_factory_registry.h" | 
| 56 #include "content/browser/webui/web_ui_impl.h" | 56 #include "content/browser/webui/web_ui_impl.h" | 
| 57 #include "content/common/browser_plugin/browser_plugin_constants.h" | 57 #include "content/common/browser_plugin/browser_plugin_constants.h" | 
| 58 #include "content/common/browser_plugin/browser_plugin_messages.h" | 58 #include "content/common/browser_plugin/browser_plugin_messages.h" | 
| 59 #include "content/common/frame_messages.h" | 59 #include "content/common/frame_messages.h" | 
| 60 #include "content/common/image_messages.h" | 60 #include "content/common/image_messages.h" | 
| 61 #include "content/common/input_messages.h" | 61 #include "content/common/input_messages.h" | 
| 62 #include "content/common/ssl_status_serialization.h" | 62 #include "content/common/ssl_status_serialization.h" | 
| 63 #include "content/common/view_messages.h" | 63 #include "content/common/view_messages.h" | 
| 64 #include "content/public/browser/ax_event_notification_details.h" | 64 #include "content/public/browser/ax_event_notification_details.h" | 
|  | 65 #include "content/public/browser/bad_message.h" | 
| 65 #include "content/public/browser/browser_context.h" | 66 #include "content/public/browser/browser_context.h" | 
| 66 #include "content/public/browser/browser_plugin_guest_manager.h" | 67 #include "content/public/browser/browser_plugin_guest_manager.h" | 
| 67 #include "content/public/browser/content_browser_client.h" | 68 #include "content/public/browser/content_browser_client.h" | 
| 68 #include "content/public/browser/devtools_agent_host.h" | 69 #include "content/public/browser/devtools_agent_host.h" | 
| 69 #include "content/public/browser/download_manager.h" | 70 #include "content/public/browser/download_manager.h" | 
| 70 #include "content/public/browser/download_url_parameters.h" | 71 #include "content/public/browser/download_url_parameters.h" | 
| 71 #include "content/public/browser/invalidate_type.h" | 72 #include "content/public/browser/invalidate_type.h" | 
| 72 #include "content/public/browser/javascript_dialog_manager.h" | 73 #include "content/public/browser/javascript_dialog_manager.h" | 
| 73 #include "content/public/browser/load_from_memory_cache_details.h" | 74 #include "content/public/browser/load_from_memory_cache_details.h" | 
| 74 #include "content/public/browser/load_notification_details.h" | 75 #include "content/public/browser/load_notification_details.h" | 
| (...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 595   IPC_END_MESSAGE_MAP() | 596   IPC_END_MESSAGE_MAP() | 
| 596   render_view_message_source_ = NULL; | 597   render_view_message_source_ = NULL; | 
| 597   render_frame_message_source_ = NULL; | 598   render_frame_message_source_ = NULL; | 
| 598 | 599 | 
| 599   return handled; | 600   return handled; | 
| 600 } | 601 } | 
| 601 | 602 | 
| 602 bool WebContentsImpl::HasValidFrameSource() { | 603 bool WebContentsImpl::HasValidFrameSource() { | 
| 603   if (!render_frame_message_source_) { | 604   if (!render_frame_message_source_) { | 
| 604     DCHECK(render_view_message_source_); | 605     DCHECK(render_view_message_source_); | 
| 605     RecordAction(base::UserMetricsAction("BadMessageTerminate_WC")); | 606     GetRenderProcessHost()->ReceivedBadMessage( | 
| 606     GetRenderProcessHost()->ReceivedBadMessage(); | 607         BadMessage::WC_INVALID_FRAME_SOURCE); | 
| 607     return false; | 608     return false; | 
| 608   } | 609   } | 
| 609 | 610 | 
| 610   return true; | 611   return true; | 
| 611 } | 612 } | 
| 612 | 613 | 
| 613 void WebContentsImpl::RunFileChooser( | 614 void WebContentsImpl::RunFileChooser( | 
| 614     RenderViewHost* render_view_host, | 615     RenderViewHost* render_view_host, | 
| 615     const FileChooserParams& params) { | 616     const FileChooserParams& params) { | 
| 616   if (delegate_) | 617   if (delegate_) | 
| (...skipping 3968 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 4585   node->render_manager()->ResumeResponseDeferredAtStart(); | 4586   node->render_manager()->ResumeResponseDeferredAtStart(); | 
| 4586 } | 4587 } | 
| 4587 | 4588 | 
| 4588 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4589 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 
| 4589   force_disable_overscroll_content_ = force_disable; | 4590   force_disable_overscroll_content_ = force_disable; | 
| 4590   if (view_) | 4591   if (view_) | 
| 4591     view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4592     view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 
| 4592 } | 4593 } | 
| 4593 | 4594 | 
| 4594 }  // namespace content | 4595 }  // namespace content | 
| OLD | NEW | 
|---|