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

Side by Side Diff: chrome/browser/media/router/route_request_result.h

Issue 2547703002: [Media Router] Handle multiple Presentation URLs when creating routes (Closed)
Patch Set: fix unittests Created 4 years 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef CHROME_BROWSER_MEDIA_ROUTER_ROUTE_REQUEST_RESULT_H_ 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_ROUTE_REQUEST_RESULT_H_
6 #define CHROME_BROWSER_MEDIA_ROUTER_ROUTE_REQUEST_RESULT_H_ 6 #define CHROME_BROWSER_MEDIA_ROUTER_ROUTE_REQUEST_RESULT_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "url/gurl.h"
12 13
13 namespace media_router { 14 namespace media_router {
14 15
15 class MediaRoute; 16 class MediaRoute;
16 17
17 // Holds the result of a successful or failed route request. 18 // Holds the result of a successful or failed route request.
18 // On success: 19 // On success:
19 // |route|: The route created or joined. 20 // |route|: The route created or joined.
20 // |presentation_id|: 21 // |presentation_id|:
21 // The presentation ID of the route created or joined. In the case of 22 // The presentation ID of the route created or joined. In the case of
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 const std::string& presentation_id); 54 const std::string& presentation_id);
54 static std::unique_ptr<RouteRequestResult> FromError(const std::string& error, 55 static std::unique_ptr<RouteRequestResult> FromError(const std::string& error,
55 ResultCode result_code); 56 ResultCode result_code);
56 57
57 ~RouteRequestResult(); 58 ~RouteRequestResult();
58 59
59 // Note the caller does not own the returned MediaRoute. The caller must 60 // Note the caller does not own the returned MediaRoute. The caller must
60 // create a copy if they wish to use it after this object is destroyed. 61 // create a copy if they wish to use it after this object is destroyed.
61 const MediaRoute* route() const { return route_.get(); } 62 const MediaRoute* route() const { return route_.get(); }
62 std::string presentation_id() const { return presentation_id_; } 63 std::string presentation_id() const { return presentation_id_; }
64 GURL presentation_url() const { return presentation_url_; }
63 std::string error() const { return error_; } 65 std::string error() const { return error_; }
64 ResultCode result_code() const { return result_code_; } 66 ResultCode result_code() const { return result_code_; }
65 67
66 private: 68 private:
67 RouteRequestResult(std::unique_ptr<MediaRoute> route, 69 RouteRequestResult(std::unique_ptr<MediaRoute> route,
68 const std::string& presentation_id, 70 const std::string& presentation_id,
69 const std::string& error, 71 const std::string& error,
70 ResultCode result_code); 72 ResultCode result_code);
71 73
72 std::unique_ptr<MediaRoute> route_; 74 std::unique_ptr<MediaRoute> route_;
73 std::string presentation_id_; 75 std::string presentation_id_;
76 GURL presentation_url_;
74 std::string error_; 77 std::string error_;
75 ResultCode result_code_; 78 ResultCode result_code_;
76 79
77 DISALLOW_COPY_AND_ASSIGN(RouteRequestResult); 80 DISALLOW_COPY_AND_ASSIGN(RouteRequestResult);
78 }; 81 };
79 82
80 } // namespace media_router 83 } // namespace media_router
81 84
82 #endif // CHROME_BROWSER_MEDIA_ROUTER_ROUTE_REQUEST_RESULT_H_ 85 #endif // CHROME_BROWSER_MEDIA_ROUTER_ROUTE_REQUEST_RESULT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698