| 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 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 909 return true; | 909 return true; |
| 910 } | 910 } |
| 911 | 911 |
| 912 void RenderFrameHostImpl::SetRenderFrameCreated(bool created) { | 912 void RenderFrameHostImpl::SetRenderFrameCreated(bool created) { |
| 913 bool was_created = render_frame_created_; | 913 bool was_created = render_frame_created_; |
| 914 render_frame_created_ = created; | 914 render_frame_created_ = created; |
| 915 | 915 |
| 916 // If the current status is different than the new status, the delegate | 916 // If the current status is different than the new status, the delegate |
| 917 // needs to be notified. | 917 // needs to be notified. |
| 918 if (delegate_ && (created != was_created)) { | 918 if (delegate_ && (created != was_created)) { |
| 919 if (created) | 919 if (created) { |
| 920 SetUpMojoIfNeeded(); |
| 920 delegate_->RenderFrameCreated(this); | 921 delegate_->RenderFrameCreated(this); |
| 921 else | 922 } else { |
| 922 delegate_->RenderFrameDeleted(this); | 923 delegate_->RenderFrameDeleted(this); |
| 924 } |
| 923 } | 925 } |
| 924 | 926 |
| 925 if (created && render_widget_host_) | 927 if (created && render_widget_host_) |
| 926 render_widget_host_->InitForFrame(); | 928 render_widget_host_->InitForFrame(); |
| 927 } | 929 } |
| 928 | 930 |
| 929 void RenderFrameHostImpl::Init() { | 931 void RenderFrameHostImpl::Init() { |
| 930 ResourceDispatcherHost::ResumeBlockedRequestsForFrameFromUI(this); | 932 ResourceDispatcherHost::ResumeBlockedRequestsForFrameFromUI(this); |
| 931 } | 933 } |
| 932 | 934 |
| (...skipping 2205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3138 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 3140 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
| 3139 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 3141 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
| 3140 return web_bluetooth_service_.get(); | 3142 return web_bluetooth_service_.get(); |
| 3141 } | 3143 } |
| 3142 | 3144 |
| 3143 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 3145 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
| 3144 web_bluetooth_service_.reset(); | 3146 web_bluetooth_service_.reset(); |
| 3145 } | 3147 } |
| 3146 | 3148 |
| 3147 } // namespace content | 3149 } // namespace content |
| OLD | NEW |