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

Side by Side Diff: content/shell/renderer/test_runner/mock_presentation_client.cc

Issue 935083002: [PresentationAPI] Implementing start/joinSession from WebPresentationClient to PresentationService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: is_null() checks for StructPtr's instead of get() Created 5 years, 10 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/shell/renderer/test_runner/mock_presentation_client.h" 5 #include "content/shell/renderer/test_runner/mock_presentation_client.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "content/shell/renderer/test_runner/mock_presentation_service.h" 8 #include "content/shell/renderer/test_runner/mock_presentation_service.h"
9 #include "third_party/WebKit/public/platform/modules/presentation/WebPresentatio nController.h" 9 #include "third_party/WebKit/public/platform/modules/presentation/WebPresentatio nController.h"
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 void MockPresentationClient::setController( 44 void MockPresentationClient::setController(
45 blink::WebPresentationController* controller) { 45 blink::WebPresentationController* controller) {
46 DCHECK(controller_ != controller && (!controller || !controller_)) 46 DCHECK(controller_ != controller && (!controller || !controller_))
47 << "Either one of the new or the old controller must be null, " 47 << "Either one of the new or the old controller must be null, "
48 "controller_ is " << controller_ << ", controller is " << controller; 48 "controller_ is " << controller_ << ", controller is " << controller;
49 49
50 controller_ = controller; 50 controller_ = controller;
51 } 51 }
52 52
53 void MockPresentationClient::startSession(
54 const blink::WebString& presentationUrl,
55 const blink::WebString& presentationId,
56 blink::WebPresentationSessionClientCallbacks* callback) {
57 NOTIMPLEMENTED();
mlamouri (slow - plz ping) 2015/02/23 14:07:39 delete callback;
whywhat 2015/02/25 14:12:42 Done.
58 }
59
60 void MockPresentationClient::joinSession(
61 const blink::WebString& presentationUrl,
62 const blink::WebString& presentationId,
63 blink::WebPresentationSessionClientCallbacks* callback) {
64 NOTIMPLEMENTED();
mlamouri (slow - plz ping) 2015/02/23 14:07:39 delete callback;
whywhat 2015/02/25 14:12:42 Done.
65 }
66
53 void MockPresentationClient::updateAvailableChangeWatched(bool watched) { 67 void MockPresentationClient::updateAvailableChangeWatched(bool watched) {
54 if (!watched) 68 if (!watched)
55 return; 69 return;
56 DCHECK(controller_); 70 DCHECK(controller_);
57 if (screen_availability_) 71 if (screen_availability_)
58 controller_->didChangeAvailability(screen_availability_); 72 controller_->didChangeAvailability(screen_availability_);
59 } 73 }
60 74
61 } // namespace content 75 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698