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

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: rebase 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 const std::string& presentation_id); 56 const std::string& presentation_id);
56 static std::unique_ptr<RouteRequestResult> FromError(const std::string& error, 57 static std::unique_ptr<RouteRequestResult> FromError(const std::string& error,
57 ResultCode result_code); 58 ResultCode result_code);
58 59
59 ~RouteRequestResult(); 60 ~RouteRequestResult();
60 61
61 // Note the caller does not own the returned MediaRoute. The caller must 62 // Note the caller does not own the returned MediaRoute. The caller must
62 // create a copy if they wish to use it after this object is destroyed. 63 // create a copy if they wish to use it after this object is destroyed.
63 const MediaRoute* route() const { return route_.get(); } 64 const MediaRoute* route() const { return route_.get(); }
64 std::string presentation_id() const { return presentation_id_; } 65 std::string presentation_id() const { return presentation_id_; }
66 GURL presentation_url() const { return presentation_url_; }
65 std::string error() const { return error_; } 67 std::string error() const { return error_; }
66 ResultCode result_code() const { return result_code_; } 68 ResultCode result_code() const { return result_code_; }
67 69
68 private: 70 private:
69 RouteRequestResult(std::unique_ptr<MediaRoute> route, 71 RouteRequestResult(std::unique_ptr<MediaRoute> route,
70 const std::string& presentation_id, 72 const std::string& presentation_id,
71 const std::string& error, 73 const std::string& error,
72 ResultCode result_code); 74 ResultCode result_code);
73 75
74 std::unique_ptr<MediaRoute> route_; 76 std::unique_ptr<MediaRoute> route_;
75 std::string presentation_id_; 77 std::string presentation_id_;
78 GURL presentation_url_;
76 std::string error_; 79 std::string error_;
77 ResultCode result_code_; 80 ResultCode result_code_;
78 81
79 DISALLOW_COPY_AND_ASSIGN(RouteRequestResult); 82 DISALLOW_COPY_AND_ASSIGN(RouteRequestResult);
80 }; 83 };
81 84
82 } // namespace media_router 85 } // namespace media_router
83 86
84 #endif // CHROME_BROWSER_MEDIA_ROUTER_ROUTE_REQUEST_RESULT_H_ 87 #endif // CHROME_BROWSER_MEDIA_ROUTER_ROUTE_REQUEST_RESULT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698