| 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 15 matching lines...) Expand all Loading... |
| 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(const MediaRoute* route, | 35 void OnRouteResponseReceived(const MediaRoute* route, |
| 36 const std::string& presentation_id, |
| 36 const std::string& error); | 37 const std::string& error); |
| 37 | 38 |
| 38 // Initializes |observer_| to listen for sinks compatible with |source|, | 39 // Initializes |observer_| to listen for sinks compatible with |source|, |
| 39 // finds sink with name matching receiver_, and establishes media | 40 // finds sink with name matching receiver_, and establishes media |
| 40 // route between the source and sink. | 41 // route between the source and sink. |
| 41 // |observer_| and |route_id_| will be initialized. | 42 // |observer_| and |route_id_| will be initialized. |
| 42 // |origin| is the URL of requestor's page. | 43 // |origin| is the URL of requestor's page. |
| 43 // |tab_id| is the ID of the tab in which the request was made. | 44 // |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 | 45 // |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 | 46 // scope for JoinRoute() requests. (e.g., if enforced, the page |
| (...skipping 18 matching lines...) Expand all Loading... |
| 64 std::string receiver_; | 65 std::string receiver_; |
| 65 | 66 |
| 66 MediaRouter* media_router_; | 67 MediaRouter* media_router_; |
| 67 scoped_ptr<TestMediaSinksObserver> observer_; | 68 scoped_ptr<TestMediaSinksObserver> observer_; |
| 68 MediaRoute::Id route_id_; | 69 MediaRoute::Id route_id_; |
| 69 }; | 70 }; |
| 70 | 71 |
| 71 } // namespace media_router | 72 } // namespace media_router |
| 72 | 73 |
| 73 #endif // CHROME_TEST_MEDIA_ROUTER_MEDIA_ROUTER_E2E_BROWSERTEST_H_ | 74 #endif // CHROME_TEST_MEDIA_ROUTER_MEDIA_ROUTER_E2E_BROWSERTEST_H_ |
| OLD | NEW |