OLD | NEW |
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 #ifndef CHROME_TEST_MEDIA_ROUTER_MEDIA_ROUTER_E2E_BROWSERTEST_H_ | 5 #ifndef CHROME_TEST_MEDIA_ROUTER_MEDIA_ROUTER_E2E_BROWSERTEST_H_ |
6 #define CHROME_TEST_MEDIA_ROUTER_MEDIA_ROUTER_E2E_BROWSERTEST_H_ | 6 #define CHROME_TEST_MEDIA_ROUTER_MEDIA_ROUTER_E2E_BROWSERTEST_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 protected: | 25 protected: |
26 // InProcessBrowserTest Overrides | 26 // InProcessBrowserTest Overrides |
27 void SetUpOnMainThread() override; | 27 void SetUpOnMainThread() override; |
28 void TearDownOnMainThread() override; | 28 void TearDownOnMainThread() override; |
29 | 29 |
30 // MediaRouterBaseBrowserTest Overrides | 30 // MediaRouterBaseBrowserTest Overrides |
31 void ParseCommandLine() override; | 31 void ParseCommandLine() override; |
32 | 32 |
33 // Callback from MediaRouter when a response to a media route request is | 33 // Callback from MediaRouter when a response to a media route request is |
34 // received. | 34 // received. |
35 void OnRouteResponseReceived(scoped_ptr<MediaRoute> route, | 35 void OnRouteResponseReceived(const MediaRoute* route, |
36 const std::string& error); | 36 const std::string& error); |
37 | 37 |
38 // Initializes |observer_| to listen for sinks compatible with |source|, | 38 // Initializes |observer_| to listen for sinks compatible with |source|, |
39 // finds sink with name matching receiver_, and establishes media | 39 // finds sink with name matching receiver_, and establishes media |
40 // route between the source and sink. | 40 // route between the source and sink. |
41 // |observer_| and |route_id_| will be initialized. | 41 // |observer_| and |route_id_| will be initialized. |
42 // |origin| is the URL of requestor's page. | 42 // |origin| is the URL of requestor's page. |
43 // |tab_id| is the ID of the tab in which the request was made. | 43 // |tab_id| is the ID of the tab in which the request was made. |
44 // |origin| and |tab_id| are used for enforcing same-origin and/or same-tab | 44 // |origin| and |tab_id| are used for enforcing same-origin and/or same-tab |
45 // scope for JoinRoute() requests. (e.g., if enforced, the page | 45 // scope for JoinRoute() requests. (e.g., if enforced, the page |
(...skipping 18 matching lines...) Expand all Loading... |
64 std::string receiver_; | 64 std::string receiver_; |
65 | 65 |
66 MediaRouter* media_router_; | 66 MediaRouter* media_router_; |
67 scoped_ptr<TestMediaSinksObserver> observer_; | 67 scoped_ptr<TestMediaSinksObserver> observer_; |
68 MediaRoute::Id route_id_; | 68 MediaRoute::Id route_id_; |
69 }; | 69 }; |
70 | 70 |
71 } // namespace media_router | 71 } // namespace media_router |
72 | 72 |
73 #endif // CHROME_TEST_MEDIA_ROUTER_MEDIA_ROUTER_E2E_BROWSERTEST_H_ | 73 #endif // CHROME_TEST_MEDIA_ROUTER_MEDIA_ROUTER_E2E_BROWSERTEST_H_ |
OLD | NEW |