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" |
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
527 OnDidLoadResourceFromMemoryCache) | 527 OnDidLoadResourceFromMemoryCache) |
528 IPC_MESSAGE_HANDLER(ViewHostMsg_DidDisplayInsecureContent, | 528 IPC_MESSAGE_HANDLER(ViewHostMsg_DidDisplayInsecureContent, |
529 OnDidDisplayInsecureContent) | 529 OnDidDisplayInsecureContent) |
530 IPC_MESSAGE_HANDLER(ViewHostMsg_DidRunInsecureContent, | 530 IPC_MESSAGE_HANDLER(ViewHostMsg_DidRunInsecureContent, |
531 OnDidRunInsecureContent) | 531 OnDidRunInsecureContent) |
532 IPC_MESSAGE_HANDLER(ViewHostMsg_GoToEntryAtOffset, OnGoToEntryAtOffset) | 532 IPC_MESSAGE_HANDLER(ViewHostMsg_GoToEntryAtOffset, OnGoToEntryAtOffset) |
533 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateZoomLimits, OnUpdateZoomLimits) | 533 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateZoomLimits, OnUpdateZoomLimits) |
534 IPC_MESSAGE_HANDLER(ViewHostMsg_EnumerateDirectory, OnEnumerateDirectory) | 534 IPC_MESSAGE_HANDLER(ViewHostMsg_EnumerateDirectory, OnEnumerateDirectory) |
535 IPC_MESSAGE_HANDLER(ViewHostMsg_RegisterProtocolHandler, | 535 IPC_MESSAGE_HANDLER(ViewHostMsg_RegisterProtocolHandler, |
536 OnRegisterProtocolHandler) | 536 OnRegisterProtocolHandler) |
537 IPC_MESSAGE_HANDLER(ViewHostMsg_UnregisterProtocolHandler, | |
538 OnUnregisterProtocolHandler) | |
537 IPC_MESSAGE_HANDLER(ViewHostMsg_Find_Reply, OnFindReply) | 539 IPC_MESSAGE_HANDLER(ViewHostMsg_Find_Reply, OnFindReply) |
538 IPC_MESSAGE_HANDLER(ViewHostMsg_AppCacheAccessed, OnAppCacheAccessed) | 540 IPC_MESSAGE_HANDLER(ViewHostMsg_AppCacheAccessed, OnAppCacheAccessed) |
539 IPC_MESSAGE_HANDLER(ViewHostMsg_WebUISend, OnWebUISend) | 541 IPC_MESSAGE_HANDLER(ViewHostMsg_WebUISend, OnWebUISend) |
540 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestPpapiBrokerPermission, | 542 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestPpapiBrokerPermission, |
541 OnRequestPpapiBrokerPermission) | 543 OnRequestPpapiBrokerPermission) |
542 IPC_MESSAGE_HANDLER_GENERIC(BrowserPluginHostMsg_Attach, | 544 IPC_MESSAGE_HANDLER_GENERIC(BrowserPluginHostMsg_Attach, |
543 OnBrowserPluginMessage(message)) | 545 OnBrowserPluginMessage(message)) |
544 IPC_MESSAGE_HANDLER(ImageHostMsg_DidDownloadImage, OnDidDownloadImage) | 546 IPC_MESSAGE_HANDLER(ImageHostMsg_DidDownloadImage, OnDidDownloadImage) |
545 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateFaviconURL, OnUpdateFaviconURL) | 547 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateFaviconURL, OnUpdateFaviconURL) |
546 IPC_MESSAGE_HANDLER(ViewHostMsg_DidFirstVisuallyNonEmptyPaint, | 548 IPC_MESSAGE_HANDLER(ViewHostMsg_DidFirstVisuallyNonEmptyPaint, |
(...skipping 2203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2750 return; | 2752 return; |
2751 | 2753 |
2752 ChildProcessSecurityPolicyImpl* policy = | 2754 ChildProcessSecurityPolicyImpl* policy = |
2753 ChildProcessSecurityPolicyImpl::GetInstance(); | 2755 ChildProcessSecurityPolicyImpl::GetInstance(); |
2754 if (policy->IsPseudoScheme(protocol)) | 2756 if (policy->IsPseudoScheme(protocol)) |
2755 return; | 2757 return; |
2756 | 2758 |
2757 delegate_->RegisterProtocolHandler(this, protocol, url, user_gesture); | 2759 delegate_->RegisterProtocolHandler(this, protocol, url, user_gesture); |
2758 } | 2760 } |
2759 | 2761 |
2762 void WebContentsImpl::OnUnregisterProtocolHandler(const std::string& protocol, | |
2763 const GURL& url, | |
2764 bool user_gesture) { | |
2765 if (!delegate_) | |
2766 return; | |
2767 | |
2768 ChildProcessSecurityPolicyImpl* policy = | |
jochen (gone - plz use gerrit)
2014/07/09 09:12:56
please clang-format this
gyuyoung-inactive
2014/07/09 09:32:16
Done.
| |
2769 ChildProcessSecurityPolicyImpl::GetInstance(); | |
2770 if (policy->IsPseudoScheme(protocol)) | |
2771 return; | |
2772 | |
2773 delegate_->UnregisterProtocolHandler(this, protocol, url, user_gesture); | |
2774 } | |
2775 | |
2760 void WebContentsImpl::OnFindReply(int request_id, | 2776 void WebContentsImpl::OnFindReply(int request_id, |
2761 int number_of_matches, | 2777 int number_of_matches, |
2762 const gfx::Rect& selection_rect, | 2778 const gfx::Rect& selection_rect, |
2763 int active_match_ordinal, | 2779 int active_match_ordinal, |
2764 bool final_update) { | 2780 bool final_update) { |
2765 if (delegate_) { | 2781 if (delegate_) { |
2766 delegate_->FindReply(this, request_id, number_of_matches, selection_rect, | 2782 delegate_->FindReply(this, request_id, number_of_matches, selection_rect, |
2767 active_match_ordinal, final_update); | 2783 active_match_ordinal, final_update); |
2768 } | 2784 } |
2769 } | 2785 } |
(...skipping 1360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4130 if (new_size != old_size) | 4146 if (new_size != old_size) |
4131 delegate_->UpdatePreferredSize(this, new_size); | 4147 delegate_->UpdatePreferredSize(this, new_size); |
4132 } | 4148 } |
4133 | 4149 |
4134 void WebContentsImpl::ResumeResponseDeferredAtStart() { | 4150 void WebContentsImpl::ResumeResponseDeferredAtStart() { |
4135 FrameTreeNode* node = frame_tree_.root(); | 4151 FrameTreeNode* node = frame_tree_.root(); |
4136 node->render_manager()->ResumeResponseDeferredAtStart(); | 4152 node->render_manager()->ResumeResponseDeferredAtStart(); |
4137 } | 4153 } |
4138 | 4154 |
4139 } // namespace content | 4155 } // namespace content |
OLD | NEW |