| 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_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_UI_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_UI_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_UI_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 namespace U_ICU_NAMESPACE { | 38 namespace U_ICU_NAMESPACE { |
| 39 class Collator; | 39 class Collator; |
| 40 } | 40 } |
| 41 | 41 |
| 42 class Browser; | 42 class Browser; |
| 43 | 43 |
| 44 namespace media_router { | 44 namespace media_router { |
| 45 | 45 |
| 46 class CreatePresentationConnectionRequest; | 46 class CreatePresentationConnectionRequest; |
| 47 class EventPageRequestManager; |
| 47 class IssuesObserver; | 48 class IssuesObserver; |
| 48 class MediaRoute; | 49 class MediaRoute; |
| 49 class MediaRouter; | 50 class MediaRouter; |
| 50 class MediaRoutesObserver; | 51 class MediaRoutesObserver; |
| 51 class MediaRouterWebUIMessageHandler; | 52 class MediaRouterWebUIMessageHandler; |
| 52 class MediaSink; | 53 class MediaSink; |
| 53 class RouteRequestResult; | 54 class RouteRequestResult; |
| 54 | 55 |
| 55 // Implements the chrome://media-router user interface. | 56 // Implements the chrome://media-router user interface. |
| 56 class MediaRouterUI | 57 class MediaRouterUI |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 // Holding a WeakPtr to PresentationServiceDelegateImpl is the cleanest way to | 408 // Holding a WeakPtr to PresentationServiceDelegateImpl is the cleanest way to |
| 408 // handle this. | 409 // handle this. |
| 409 // TODO(imcheng): hold a weak ptr to an abstract type instead. | 410 // TODO(imcheng): hold a weak ptr to an abstract type instead. |
| 410 base::WeakPtr<PresentationServiceDelegateImpl> presentation_service_delegate_; | 411 base::WeakPtr<PresentationServiceDelegateImpl> presentation_service_delegate_; |
| 411 | 412 |
| 412 content::WebContents* initiator_; | 413 content::WebContents* initiator_; |
| 413 | 414 |
| 414 // Pointer to the MediaRouter for this instance's BrowserContext. | 415 // Pointer to the MediaRouter for this instance's BrowserContext. |
| 415 MediaRouter* router_; | 416 MediaRouter* router_; |
| 416 | 417 |
| 418 // Request manager for the Media Router component extension. |
| 419 const EventPageRequestManager* event_page_request_manager_; |
| 420 |
| 417 // The start time for UI initialization metrics timer. When a dialog has been | 421 // The start time for UI initialization metrics timer. When a dialog has been |
| 418 // been painted and initialized with initial data, this should be cleared. | 422 // been painted and initialized with initial data, this should be cleared. |
| 419 base::Time start_time_; | 423 base::Time start_time_; |
| 420 | 424 |
| 421 // The observer for the route controller. Notifies |handler_| of media status | 425 // The observer for the route controller. Notifies |handler_| of media status |
| 422 // updates. | 426 // updates. |
| 423 std::unique_ptr<UIMediaRouteControllerObserver> route_controller_observer_; | 427 std::unique_ptr<UIMediaRouteControllerObserver> route_controller_observer_; |
| 424 | 428 |
| 425 // The dialog that handles opening the file dialog and validating and | 429 // The dialog that handles opening the file dialog and validating and |
| 426 // returning the results. | 430 // returning the results. |
| 427 std::unique_ptr<MediaRouterFileDialog> media_router_file_dialog_; | 431 std::unique_ptr<MediaRouterFileDialog> media_router_file_dialog_; |
| 428 | 432 |
| 429 // If set, a cast mode that is required to be shown first. | 433 // If set, a cast mode that is required to be shown first. |
| 430 base::Optional<MediaCastMode> forced_cast_mode_; | 434 base::Optional<MediaCastMode> forced_cast_mode_; |
| 431 | 435 |
| 432 // NOTE: Weak pointers must be invalidated before all other member variables. | 436 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 433 // Therefore |weak_factory_| must be placed at the end. | 437 // Therefore |weak_factory_| must be placed at the end. |
| 434 base::WeakPtrFactory<MediaRouterUI> weak_factory_; | 438 base::WeakPtrFactory<MediaRouterUI> weak_factory_; |
| 435 | 439 |
| 436 DISALLOW_COPY_AND_ASSIGN(MediaRouterUI); | 440 DISALLOW_COPY_AND_ASSIGN(MediaRouterUI); |
| 437 }; | 441 }; |
| 438 | 442 |
| 439 } // namespace media_router | 443 } // namespace media_router |
| 440 | 444 |
| 441 #endif // CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_UI_H_ | 445 #endif // CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_UI_H_ |
| OLD | NEW |