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

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

Issue 1037483003: [PresentationAPI] Implementing send() from WebPresentationClient to the PresentationService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated callback handling, message invalidation and and sending generic message struct. Created 5 years, 8 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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 293
294 // Remove listener for old default presentation URL. 294 // Remove listener for old default presentation URL.
295 delegate_->RemoveScreenAvailabilityListener( 295 delegate_->RemoveScreenAvailabilityListener(
296 render_frame_host_->GetProcess()->GetID(), 296 render_frame_host_->GetProcess()->GetID(),
297 render_frame_host_->GetRoutingID(), 297 render_frame_host_->GetRoutingID(),
298 old_it->second.get()); 298 old_it->second.get());
299 availability_contexts_.erase(old_it); 299 availability_contexts_.erase(old_it);
300 DoSetDefaultPresentationUrl(new_default_url, default_presentation_id); 300 DoSetDefaultPresentationUrl(new_default_url, default_presentation_id);
301 } 301 }
302 302
303 void PresentationServiceImpl::SendMessage(
304 presentation::MessageRequestPtr message_request,
305 const SendMessageMojoCallback& callback) {
306 DCHECK(!message_request.is_null());
307 if (delegate_) {
308 // TODO(s.singapati): delegate_->SendMessage() is currently disabled
309 //because of invalid include path of presentation_message.h.
310 /*
311 delegate_->SendMessage(
312 render_frame_host_->GetProcess()->GetID(),
313 render_frame_host_->GetRoutingID(),
314 new MessageRequest(message_request.Pass()));
315 */
316 }
317
318 callback.Run();
319 }
320
303 void PresentationServiceImpl::CloseSession( 321 void PresentationServiceImpl::CloseSession(
304 const mojo::String& presentation_url, 322 const mojo::String& presentation_url,
305 const mojo::String& presentation_id) { 323 const mojo::String& presentation_id) {
306 NOTIMPLEMENTED(); 324 NOTIMPLEMENTED();
307 } 325 }
308 326
309 void PresentationServiceImpl::ListenForSessionStateChange( 327 void PresentationServiceImpl::ListenForSessionStateChange(
310 const SessionStateCallback& callback) { 328 const SessionStateCallback& callback) {
311 NOTIMPLEMENTED(); 329 NOTIMPLEMENTED();
312 } 330 }
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 : presentation_url(presentation_url), 473 : presentation_url(presentation_url),
456 presentation_id(presentation_id), 474 presentation_id(presentation_id),
457 callback(callback) { 475 callback(callback) {
458 } 476 }
459 477
460 PresentationServiceImpl::StartSessionRequest::~StartSessionRequest() { 478 PresentationServiceImpl::StartSessionRequest::~StartSessionRequest() {
461 } 479 }
462 480
463 } // namespace content 481 } // namespace content
464 482
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698