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
3 // found in the LICENSE file.
5 #include "chrome/browser/media/router/create_session_request.h"
7 #include "chrome/browser/media/router/media_source_helper.h"
9 using content::PresentationSessionInfo
;
10 using content::PresentationError
;
12 namespace media_router
{
14 CreateSessionRequest::CreateSessionRequest(
15 const std::string
& presentation_url
,
16 const std::string
& presentation_id
,
17 const GURL
& frame_url
,
18 const PresentationSessionSuccessCallback
& success_cb
,
19 const PresentationSessionErrorCallback
& error_cb
)
20 : presentation_info_(presentation_url
, presentation_id
),
21 media_source_(presentation_url
),
22 frame_url_(frame_url
),
23 success_cb_(success_cb
),
28 CreateSessionRequest::~CreateSessionRequest() {
31 void CreateSessionRequest::MaybeInvokeSuccessCallback() {
33 success_cb_
.Run(presentation_info_
);
38 void CreateSessionRequest::MaybeInvokeErrorCallback(
39 const content::PresentationError
& error
) {
46 } // namespace media_router