Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Side by Side Diff: content/browser/frame_host/interstitial_page_impl.cc

Issue 2758993002: Move the functions which block, resume and cancel requests for a frame route id out of ResourceDisp… (Closed)
Patch Set: Remove DCHECK for RDHI on the same lines as the old code Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/frame_host/interstitial_page_impl.h" 5 #include "content/browser/frame_host/interstitial_page_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/location.h" 12 #include "base/location.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/ptr_util.h" 14 #include "base/memory/ptr_util.h"
15 #include "base/single_thread_task_runner.h" 15 #include "base/single_thread_task_runner.h"
16 #include "base/strings/string_util.h" 16 #include "base/strings/string_util.h"
17 #include "base/strings/utf_string_conversions.h" 17 #include "base/strings/utf_string_conversions.h"
18 #include "base/threading/thread.h" 18 #include "base/threading/thread.h"
19 #include "base/threading/thread_task_runner_handle.h" 19 #include "base/threading/thread_task_runner_handle.h"
20 #include "build/build_config.h" 20 #include "build/build_config.h"
21 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" 21 #include "content/browser/dom_storage/dom_storage_context_wrapper.h"
22 #include "content/browser/dom_storage/session_storage_namespace_impl.h" 22 #include "content/browser/dom_storage/session_storage_namespace_impl.h"
23 #include "content/browser/frame_host/interstitial_page_navigator_impl.h" 23 #include "content/browser/frame_host/interstitial_page_navigator_impl.h"
24 #include "content/browser/frame_host/navigation_controller_impl.h" 24 #include "content/browser/frame_host/navigation_controller_impl.h"
25 #include "content/browser/frame_host/navigation_entry_impl.h" 25 #include "content/browser/frame_host/navigation_entry_impl.h"
26 #include "content/browser/loader/resource_dispatcher_host_impl.h"
27 #include "content/browser/renderer_host/render_process_host_impl.h" 26 #include "content/browser/renderer_host/render_process_host_impl.h"
28 #include "content/browser/renderer_host/render_view_host_delegate_view.h" 27 #include "content/browser/renderer_host/render_view_host_delegate_view.h"
29 #include "content/browser/renderer_host/render_view_host_factory.h" 28 #include "content/browser/renderer_host/render_view_host_factory.h"
30 #include "content/browser/renderer_host/render_view_host_impl.h" 29 #include "content/browser/renderer_host/render_view_host_impl.h"
31 #include "content/browser/renderer_host/render_widget_host_view_base.h" 30 #include "content/browser/renderer_host/render_widget_host_view_base.h"
32 #include "content/browser/renderer_host/text_input_manager.h" 31 #include "content/browser/renderer_host/text_input_manager.h"
33 #include "content/browser/site_instance_impl.h" 32 #include "content/browser/site_instance_impl.h"
34 #include "content/browser/web_contents/web_contents_impl.h" 33 #include "content/browser/web_contents/web_contents_impl.h"
35 #include "content/browser/web_contents/web_contents_view.h" 34 #include "content/browser/web_contents/web_contents_view.h"
36 #include "content/common/features.h" 35 #include "content/common/features.h"
37 #include "content/common/frame_messages.h" 36 #include "content/common/frame_messages.h"
38 #include "content/common/input_messages.h" 37 #include "content/common/input_messages.h"
39 #include "content/common/view_messages.h" 38 #include "content/common/view_messages.h"
40 #include "content/public/browser/browser_context.h" 39 #include "content/public/browser/browser_context.h"
41 #include "content/public/browser/browser_thread.h" 40 #include "content/public/browser/browser_thread.h"
42 #include "content/public/browser/content_browser_client.h" 41 #include "content/public/browser/content_browser_client.h"
43 #include "content/public/browser/interstitial_page_delegate.h" 42 #include "content/public/browser/interstitial_page_delegate.h"
44 #include "content/public/browser/invalidate_type.h" 43 #include "content/public/browser/invalidate_type.h"
45 #include "content/public/browser/notification_service.h" 44 #include "content/public/browser/notification_service.h"
46 #include "content/public/browser/notification_source.h" 45 #include "content/public/browser/notification_source.h"
47 #include "content/public/browser/notification_types.h" 46 #include "content/public/browser/notification_types.h"
47 #include "content/public/browser/render_frame_host.h"
48 #include "content/public/browser/storage_partition.h" 48 #include "content/public/browser/storage_partition.h"
49 #include "content/public/browser/user_metrics.h" 49 #include "content/public/browser/user_metrics.h"
50 #include "content/public/browser/web_contents_delegate.h" 50 #include "content/public/browser/web_contents_delegate.h"
51 #include "content/public/common/bindings_policy.h" 51 #include "content/public/common/bindings_policy.h"
52 #include "net/base/escape.h" 52 #include "net/base/escape.h"
53 #include "net/url_request/url_request_context_getter.h" 53 #include "net/url_request/url_request_context_getter.h"
54 #include "ui/base/page_transition_types.h" 54 #include "ui/base/page_transition_types.h"
55 55
56 using blink::WebDragOperation; 56 using blink::WebDragOperation;
57 using blink::WebDragOperationsMask; 57 using blink::WebDragOperationsMask;
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after
841 RenderFrameHostImpl* rfh = 841 RenderFrameHostImpl* rfh =
842 static_cast<RenderFrameHostImpl*>(rvh->GetMainFrame()); 842 static_cast<RenderFrameHostImpl*>(rvh->GetMainFrame());
843 // Note, the RenderViewHost can lose its main frame if a new RenderFrameHost 843 // Note, the RenderViewHost can lose its main frame if a new RenderFrameHost
844 // commits with a new RenderViewHost. Additionally, RenderViewHosts for OOPIF 844 // commits with a new RenderViewHost. Additionally, RenderViewHosts for OOPIF
845 // don't have main frames. 845 // don't have main frames.
846 if (!rfh) 846 if (!rfh)
847 return; 847 return;
848 848
849 switch (action) { 849 switch (action) {
850 case BLOCK: 850 case BLOCK:
851 ResourceDispatcherHost::BlockRequestsForFrameFromUI(rfh); 851 RenderFrameHost::BlockRequestsForFrame(rfh);
852 break; 852 break;
853 case RESUME: 853 case RESUME:
854 ResourceDispatcherHost::ResumeBlockedRequestsForFrameFromUI(rfh); 854 RenderFrameHost::ResumeBlockedRequestsForFrame(rfh);
855 break; 855 break;
856 default: 856 default:
857 DCHECK_EQ(action, CANCEL); 857 DCHECK_EQ(action, CANCEL);
858 ResourceDispatcherHostImpl::CancelBlockedRequestsForFrameFromUI(rfh); 858 RenderFrameHost::CancelBlockedRequestsForFrame(rfh);
859 break; 859 break;
860 } 860 }
861 } 861 }
862 862
863 void InterstitialPageImpl::OnDomOperationResponse( 863 void InterstitialPageImpl::OnDomOperationResponse(
864 RenderFrameHostImpl* source, 864 RenderFrameHostImpl* source,
865 const std::string& json_string) { 865 const std::string& json_string) {
866 std::string json = json_string; 866 std::string json = json_string;
867 // Needed by test code. 867 // Needed by test code.
868 NotificationService::current()->Notify(NOTIFICATION_DOM_OPERATION_RESPONSE, 868 NotificationService::current()->Notify(NOTIFICATION_DOM_OPERATION_RESPONSE,
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
972 void InterstitialPageImpl::UpdateDeviceScaleFactor(double device_scale_factor) { 972 void InterstitialPageImpl::UpdateDeviceScaleFactor(double device_scale_factor) {
973 WebContentsImpl* web_contents_impl = 973 WebContentsImpl* web_contents_impl =
974 static_cast<WebContentsImpl*>(web_contents_); 974 static_cast<WebContentsImpl*>(web_contents_);
975 if (!web_contents_impl) 975 if (!web_contents_impl)
976 return; 976 return;
977 977
978 web_contents_impl->UpdateDeviceScaleFactor(device_scale_factor); 978 web_contents_impl->UpdateDeviceScaleFactor(device_scale_factor);
979 } 979 }
980 980
981 } // namespace content 981 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_impl.cc » ('j') | content/public/browser/render_frame_host.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698