| OLD | NEW |
| 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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 render_widget_host_ = new RenderWidgetHostImpl(rwh_delegate, GetProcess(), | 302 render_widget_host_ = new RenderWidgetHostImpl(rwh_delegate, GetProcess(), |
| 303 widget_routing_id, hidden); | 303 widget_routing_id, hidden); |
| 304 render_widget_host_->set_owned_by_render_frame_host(true); | 304 render_widget_host_->set_owned_by_render_frame_host(true); |
| 305 } else { | 305 } else { |
| 306 DCHECK(!render_widget_host_->owned_by_render_frame_host()); | 306 DCHECK(!render_widget_host_->owned_by_render_frame_host()); |
| 307 } | 307 } |
| 308 InputRouterImpl* ir = | 308 InputRouterImpl* ir = |
| 309 static_cast<InputRouterImpl*>(render_widget_host_->input_router()); | 309 static_cast<InputRouterImpl*>(render_widget_host_->input_router()); |
| 310 ir->SetFrameTreeNodeId(frame_tree_node_->frame_tree_node_id()); | 310 ir->SetFrameTreeNodeId(frame_tree_node_->frame_tree_node_id()); |
| 311 } | 311 } |
| 312 |
| 313 host_zoom_map_host_.reset( |
| 314 new HostZoomMapHost(delegate_->GetAsWebContents(), this)); |
| 312 } | 315 } |
| 313 | 316 |
| 314 RenderFrameHostImpl::~RenderFrameHostImpl() { | 317 RenderFrameHostImpl::~RenderFrameHostImpl() { |
| 315 // Release the WebUI instances before all else as the WebUI may accesses the | 318 // Release the WebUI instances before all else as the WebUI may accesses the |
| 316 // RenderFrameHost during cleanup. | 319 // RenderFrameHost during cleanup. |
| 317 ClearAllWebUI(); | 320 ClearAllWebUI(); |
| 318 | 321 |
| 319 GetProcess()->RemoveRoute(routing_id_); | 322 GetProcess()->RemoveRoute(routing_id_); |
| 320 g_routing_id_frame_map.Get().erase( | 323 g_routing_id_frame_map.Get().erase( |
| 321 RenderFrameHostID(GetProcess()->GetID(), routing_id_)); | 324 RenderFrameHostID(GetProcess()->GetID(), routing_id_)); |
| (...skipping 2760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3082 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 3085 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
| 3083 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 3086 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
| 3084 return web_bluetooth_service_.get(); | 3087 return web_bluetooth_service_.get(); |
| 3085 } | 3088 } |
| 3086 | 3089 |
| 3087 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 3090 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
| 3088 web_bluetooth_service_.reset(); | 3091 web_bluetooth_service_.reset(); |
| 3089 } | 3092 } |
| 3090 | 3093 |
| 3091 } // namespace content | 3094 } // namespace content |
| OLD | NEW |