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

Side by Side Diff: content/browser/presentation/presentation_service_impl.cc

Issue 1084293004: [PresentationAPI] Added on-session-message handler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 7 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 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 <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "content/browser/presentation/presentation_type_converters.h" 10 #include "content/browser/presentation/presentation_type_converters.h"
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 326
327 bool PresentationServiceImpl::FrameMatches( 327 bool PresentationServiceImpl::FrameMatches(
328 content::RenderFrameHost* render_frame_host) const { 328 content::RenderFrameHost* render_frame_host) const {
329 if (!render_frame_host) 329 if (!render_frame_host)
330 return false; 330 return false;
331 331
332 return render_frame_host->GetProcess()->GetID() == render_process_id_ && 332 return render_frame_host->GetProcess()->GetID() == render_process_id_ &&
333 render_frame_host->GetRoutingID() == render_frame_id_; 333 render_frame_host->GetRoutingID() == render_frame_id_;
334 } 334 }
335 335
336 void PresentationServiceImpl::ListenForSessionMessages(
337 const SessionMessagesCallback& callback) {
338 NOTIMPLEMENTED();
339 }
340
336 void PresentationServiceImpl::DidNavigateAnyFrame( 341 void PresentationServiceImpl::DidNavigateAnyFrame(
337 content::RenderFrameHost* render_frame_host, 342 content::RenderFrameHost* render_frame_host,
338 const content::LoadCommittedDetails& details, 343 const content::LoadCommittedDetails& details,
339 const content::FrameNavigateParams& params) { 344 const content::FrameNavigateParams& params) {
340 DVLOG(2) << "PresentationServiceImpl::DidNavigateAnyFrame"; 345 DVLOG(2) << "PresentationServiceImpl::DidNavigateAnyFrame";
341 if (!FrameMatches(render_frame_host)) 346 if (!FrameMatches(render_frame_host))
342 return; 347 return;
343 348
344 std::string prev_url_host = details.previous_url.host(); 349 std::string prev_url_host = details.previous_url.host();
345 std::string curr_url_host = params.url.host(); 350 std::string curr_url_host = params.url.host();
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 void PresentationServiceImpl::DefaultSessionStartContext::Reset() { 530 void PresentationServiceImpl::DefaultSessionStartContext::Reset() {
526 ScopedVector<DefaultSessionMojoCallback> callbacks; 531 ScopedVector<DefaultSessionMojoCallback> callbacks;
527 callbacks.swap(callbacks_); 532 callbacks.swap(callbacks_);
528 for (const auto& callback : callbacks) 533 for (const auto& callback : callbacks)
529 callback->Run(presentation::PresentationSessionInfoPtr()); 534 callback->Run(presentation::PresentationSessionInfoPtr());
530 session_.reset(); 535 session_.reset();
531 } 536 }
532 537
533 } // namespace content 538 } // namespace content
534 539
OLDNEW
« no previous file with comments | « content/browser/presentation/presentation_service_impl.h ('k') | content/common/presentation/presentation_service.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698