| 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 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 530 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateZoomLimits, OnUpdateZoomLimits) | 530 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateZoomLimits, OnUpdateZoomLimits) |
| 531 IPC_MESSAGE_HANDLER(ViewHostMsg_EnumerateDirectory, OnEnumerateDirectory) | 531 IPC_MESSAGE_HANDLER(ViewHostMsg_EnumerateDirectory, OnEnumerateDirectory) |
| 532 IPC_MESSAGE_HANDLER(ViewHostMsg_RegisterProtocolHandler, | 532 IPC_MESSAGE_HANDLER(ViewHostMsg_RegisterProtocolHandler, |
| 533 OnRegisterProtocolHandler) | 533 OnRegisterProtocolHandler) |
| 534 IPC_MESSAGE_HANDLER(ViewHostMsg_UnregisterProtocolHandler, | 534 IPC_MESSAGE_HANDLER(ViewHostMsg_UnregisterProtocolHandler, |
| 535 OnUnregisterProtocolHandler) | 535 OnUnregisterProtocolHandler) |
| 536 IPC_MESSAGE_HANDLER(ViewHostMsg_Find_Reply, OnFindReply) | 536 IPC_MESSAGE_HANDLER(ViewHostMsg_Find_Reply, OnFindReply) |
| 537 IPC_MESSAGE_HANDLER(ViewHostMsg_AppCacheAccessed, OnAppCacheAccessed) | 537 IPC_MESSAGE_HANDLER(ViewHostMsg_AppCacheAccessed, OnAppCacheAccessed) |
| 538 IPC_MESSAGE_HANDLER(ViewHostMsg_WebUISend, OnWebUISend) | 538 IPC_MESSAGE_HANDLER(ViewHostMsg_WebUISend, OnWebUISend) |
| 539 #if defined(ENABLE_PLUGINS) | 539 #if defined(ENABLE_PLUGINS) |
| 540 IPC_MESSAGE_HANDLER(FrameHostMsg_PepperInstanceCreated, |
| 541 OnPepperInstanceCreated) |
| 542 IPC_MESSAGE_HANDLER(FrameHostMsg_PepperInstanceDeleted, |
| 543 OnPepperInstanceDeleted) |
| 540 IPC_MESSAGE_HANDLER(FrameHostMsg_PepperPluginHung, OnPepperPluginHung) | 544 IPC_MESSAGE_HANDLER(FrameHostMsg_PepperPluginHung, OnPepperPluginHung) |
| 541 IPC_MESSAGE_HANDLER(FrameHostMsg_PluginCrashed, OnPluginCrashed) | 545 IPC_MESSAGE_HANDLER(FrameHostMsg_PluginCrashed, OnPluginCrashed) |
| 542 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestPpapiBrokerPermission, | 546 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestPpapiBrokerPermission, |
| 543 OnRequestPpapiBrokerPermission) | 547 OnRequestPpapiBrokerPermission) |
| 544 IPC_MESSAGE_HANDLER_GENERIC(BrowserPluginHostMsg_Attach, | 548 IPC_MESSAGE_HANDLER_GENERIC(BrowserPluginHostMsg_Attach, |
| 545 OnBrowserPluginMessage(render_frame_host, | 549 OnBrowserPluginMessage(render_frame_host, |
| 546 message)) | 550 message)) |
| 547 #endif | 551 #endif |
| 548 IPC_MESSAGE_HANDLER(ImageHostMsg_DidDownloadImage, OnDidDownloadImage) | 552 IPC_MESSAGE_HANDLER(ImageHostMsg_DidDownloadImage, OnDidDownloadImage) |
| 549 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateFaviconURL, OnUpdateFaviconURL) | 553 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateFaviconURL, OnUpdateFaviconURL) |
| (...skipping 2455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3005 // This exists for render views that don't have a WebUI, but do have WebUI | 3009 // This exists for render views that don't have a WebUI, but do have WebUI |
| 3006 // bindings enabled. | 3010 // bindings enabled. |
| 3007 void WebContentsImpl::OnWebUISend(const GURL& source_url, | 3011 void WebContentsImpl::OnWebUISend(const GURL& source_url, |
| 3008 const std::string& name, | 3012 const std::string& name, |
| 3009 const base::ListValue& args) { | 3013 const base::ListValue& args) { |
| 3010 if (delegate_) | 3014 if (delegate_) |
| 3011 delegate_->WebUISend(this, source_url, name, args); | 3015 delegate_->WebUISend(this, source_url, name, args); |
| 3012 } | 3016 } |
| 3013 | 3017 |
| 3014 #if defined(ENABLE_PLUGINS) | 3018 #if defined(ENABLE_PLUGINS) |
| 3019 void WebContentsImpl::OnPepperInstanceCreated() { |
| 3020 FOR_EACH_OBSERVER(WebContentsObserver, observers_, PepperInstanceCreated()); |
| 3021 } |
| 3022 |
| 3023 void WebContentsImpl::OnPepperInstanceDeleted() { |
| 3024 FOR_EACH_OBSERVER(WebContentsObserver, observers_, PepperInstanceDeleted()); |
| 3025 } |
| 3026 |
| 3015 void WebContentsImpl::OnPepperPluginHung(int plugin_child_id, | 3027 void WebContentsImpl::OnPepperPluginHung(int plugin_child_id, |
| 3016 const base::FilePath& path, | 3028 const base::FilePath& path, |
| 3017 bool is_hung) { | 3029 bool is_hung) { |
| 3018 UMA_HISTOGRAM_COUNTS("Pepper.PluginHung", 1); | 3030 UMA_HISTOGRAM_COUNTS("Pepper.PluginHung", 1); |
| 3019 | 3031 |
| 3020 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 3032 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| 3021 PluginHungStatusChanged(plugin_child_id, path, is_hung)); | 3033 PluginHungStatusChanged(plugin_child_id, path, is_hung)); |
| 3022 } | 3034 } |
| 3023 | 3035 |
| 3024 void WebContentsImpl::OnPluginCrashed(const base::FilePath& plugin_path, | 3036 void WebContentsImpl::OnPluginCrashed(const base::FilePath& plugin_path, |
| (...skipping 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4432 node->render_manager()->ResumeResponseDeferredAtStart(); | 4444 node->render_manager()->ResumeResponseDeferredAtStart(); |
| 4433 } | 4445 } |
| 4434 | 4446 |
| 4435 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4447 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
| 4436 force_disable_overscroll_content_ = force_disable; | 4448 force_disable_overscroll_content_ = force_disable; |
| 4437 if (view_) | 4449 if (view_) |
| 4438 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4450 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
| 4439 } | 4451 } |
| 4440 | 4452 |
| 4441 } // namespace content | 4453 } // namespace content |
| OLD | NEW |