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

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

Issue 2374863002: Remove usage of HostZoomMap from c/b/loader via ReadyToCommitNavigation (Closed)
Patch Set: android Created 4 years, 2 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/render_frame_host_impl.h" 5 #include "content/browser/frame_host/render_frame_host_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 16 matching lines...) Expand all
27 #include "content/browser/frame_host/frame_tree.h" 27 #include "content/browser/frame_host/frame_tree.h"
28 #include "content/browser/frame_host/frame_tree_node.h" 28 #include "content/browser/frame_host/frame_tree_node.h"
29 #include "content/browser/frame_host/navigation_entry_impl.h" 29 #include "content/browser/frame_host/navigation_entry_impl.h"
30 #include "content/browser/frame_host/navigation_handle_impl.h" 30 #include "content/browser/frame_host/navigation_handle_impl.h"
31 #include "content/browser/frame_host/navigation_request.h" 31 #include "content/browser/frame_host/navigation_request.h"
32 #include "content/browser/frame_host/navigator.h" 32 #include "content/browser/frame_host/navigator.h"
33 #include "content/browser/frame_host/navigator_impl.h" 33 #include "content/browser/frame_host/navigator_impl.h"
34 #include "content/browser/frame_host/render_frame_host_delegate.h" 34 #include "content/browser/frame_host/render_frame_host_delegate.h"
35 #include "content/browser/frame_host/render_frame_proxy_host.h" 35 #include "content/browser/frame_host/render_frame_proxy_host.h"
36 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" 36 #include "content/browser/frame_host/render_widget_host_view_child_frame.h"
37 #include "content/browser/host_zoom_map_observer.h"
37 #include "content/browser/loader/resource_dispatcher_host_impl.h" 38 #include "content/browser/loader/resource_dispatcher_host_impl.h"
38 #include "content/browser/permissions/permission_service_context.h" 39 #include "content/browser/permissions/permission_service_context.h"
39 #include "content/browser/permissions/permission_service_impl.h" 40 #include "content/browser/permissions/permission_service_impl.h"
40 #include "content/browser/presentation/presentation_service_impl.h" 41 #include "content/browser/presentation/presentation_service_impl.h"
41 #include "content/browser/renderer_host/input/input_router_impl.h" 42 #include "content/browser/renderer_host/input/input_router_impl.h"
42 #include "content/browser/renderer_host/input/timeout_monitor.h" 43 #include "content/browser/renderer_host/input/timeout_monitor.h"
43 #include "content/browser/renderer_host/render_process_host_impl.h" 44 #include "content/browser/renderer_host/render_process_host_impl.h"
44 #include "content/browser/renderer_host/render_view_host_delegate.h" 45 #include "content/browser/renderer_host/render_view_host_delegate.h"
45 #include "content/browser/renderer_host/render_view_host_delegate_view.h" 46 #include "content/browser/renderer_host/render_view_host_delegate_view.h"
46 #include "content/browser/renderer_host/render_view_host_impl.h" 47 #include "content/browser/renderer_host/render_view_host_impl.h"
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 render_widget_host_ = new RenderWidgetHostImpl(rwh_delegate, GetProcess(), 303 render_widget_host_ = new RenderWidgetHostImpl(rwh_delegate, GetProcess(),
303 widget_routing_id, hidden); 304 widget_routing_id, hidden);
304 render_widget_host_->set_owned_by_render_frame_host(true); 305 render_widget_host_->set_owned_by_render_frame_host(true);
305 } else { 306 } else {
306 DCHECK(!render_widget_host_->owned_by_render_frame_host()); 307 DCHECK(!render_widget_host_->owned_by_render_frame_host());
307 } 308 }
308 InputRouterImpl* ir = 309 InputRouterImpl* ir =
309 static_cast<InputRouterImpl*>(render_widget_host_->input_router()); 310 static_cast<InputRouterImpl*>(render_widget_host_->input_router());
310 ir->SetFrameTreeNodeId(frame_tree_node_->frame_tree_node_id()); 311 ir->SetFrameTreeNodeId(frame_tree_node_->frame_tree_node_id());
311 } 312 }
313
314 if (delegate_->GetAsWebContents())
315 HostZoomMapObserver::CreateForWebContents(delegate->GetAsWebContents());
nasko 2016/10/17 22:49:03 Why create the observer here? If it is per WebCont
scottmg 2016/10/25 20:12:40 Why, indeed. Done.
312 } 316 }
313 317
314 RenderFrameHostImpl::~RenderFrameHostImpl() { 318 RenderFrameHostImpl::~RenderFrameHostImpl() {
315 // Release the WebUI instances before all else as the WebUI may accesses the 319 // Release the WebUI instances before all else as the WebUI may accesses the
316 // RenderFrameHost during cleanup. 320 // RenderFrameHost during cleanup.
317 ClearAllWebUI(); 321 ClearAllWebUI();
318 322
319 GetProcess()->RemoveRoute(routing_id_); 323 GetProcess()->RemoveRoute(routing_id_);
320 g_routing_id_frame_map.Get().erase( 324 g_routing_id_frame_map.Get().erase(
321 RenderFrameHostID(GetProcess()->GetID(), routing_id_)); 325 RenderFrameHostID(GetProcess()->GetID(), routing_id_));
(...skipping 2760 matching lines...) Expand 10 before | Expand all | Expand 10 after
3082 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( 3086 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind(
3083 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); 3087 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this)));
3084 return web_bluetooth_service_.get(); 3088 return web_bluetooth_service_.get();
3085 } 3089 }
3086 3090
3087 void RenderFrameHostImpl::DeleteWebBluetoothService() { 3091 void RenderFrameHostImpl::DeleteWebBluetoothService() {
3088 web_bluetooth_service_.reset(); 3092 web_bluetooth_service_.reset();
3089 } 3093 }
3090 3094
3091 } // namespace content 3095 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698