| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/presentation/presentation_service_impl.h" | 5 #include "content/browser/presentation/presentation_service_impl.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "content/public/browser/content_browser_client.h" | 8 #include "content/public/browser/content_browser_client.h" |
| 9 #include "content/public/browser/navigation_details.h" | 9 #include "content/public/browser/navigation_details.h" |
| 10 #include "content/public/browser/render_frame_host.h" | 10 #include "content/public/browser/render_frame_host.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 NOTIMPLEMENTED(); | 119 NOTIMPLEMENTED(); |
| 120 } | 120 } |
| 121 | 121 |
| 122 void PresentationServiceImpl::JoinSession( | 122 void PresentationServiceImpl::JoinSession( |
| 123 const mojo::String& presentation_url, | 123 const mojo::String& presentation_url, |
| 124 const mojo::String& presentation_id, | 124 const mojo::String& presentation_id, |
| 125 const NewSessionMojoCallback& callback) { | 125 const NewSessionMojoCallback& callback) { |
| 126 NOTIMPLEMENTED(); | 126 NOTIMPLEMENTED(); |
| 127 } | 127 } |
| 128 | 128 |
| 129 void PresentationServiceImpl::CloseSession( |
| 130 const mojo::String& presentation_url, |
| 131 const mojo::String& presentation_id) { |
| 132 NOTIMPLEMENTED(); |
| 133 } |
| 134 |
| 129 void PresentationServiceImpl::DidNavigateAnyFrame( | 135 void PresentationServiceImpl::DidNavigateAnyFrame( |
| 130 content::RenderFrameHost* render_frame_host, | 136 content::RenderFrameHost* render_frame_host, |
| 131 const content::LoadCommittedDetails& details, | 137 const content::LoadCommittedDetails& details, |
| 132 const content::FrameNavigateParams& params) { | 138 const content::FrameNavigateParams& params) { |
| 133 VLOG(2) << "PresentationServiceImpl::DidNavigateAnyFrame"; | 139 VLOG(2) << "PresentationServiceImpl::DidNavigateAnyFrame"; |
| 134 if (render_frame_host_ != render_frame_host) | 140 if (render_frame_host_ != render_frame_host) |
| 135 return; | 141 return; |
| 136 | 142 |
| 137 std::string prev_url_host = details.previous_url.host(); | 143 std::string prev_url_host = details.previous_url.host(); |
| 138 std::string curr_url_host = params.url.host(); | 144 std::string curr_url_host = params.url.host(); |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 } else { | 228 } else { |
| 223 // Invoke callback and erase it. | 229 // Invoke callback and erase it. |
| 224 // There shouldn't be any result stored in this scenario. | 230 // There shouldn't be any result stored in this scenario. |
| 225 DCHECK(!available_ptr_); | 231 DCHECK(!available_ptr_); |
| 226 callback_ptr_->Run(available); | 232 callback_ptr_->Run(available); |
| 227 Reset(); | 233 Reset(); |
| 228 } | 234 } |
| 229 } | 235 } |
| 230 | 236 |
| 231 } // namespace content | 237 } // namespace content |
| OLD | NEW |