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

Side by Side Diff: chrome/browser/media/router/mojo/media_router_mojo_impl.h

Issue 2927833002: [Media Router] Add CastMediaSinkService (Closed)
Patch Set: add dependency patchset Created 3 years, 6 months 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 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_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_IMPL_H_ 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_IMPL_H_
6 #define CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_IMPL_H_ 6 #define CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <deque> 10 #include <deque>
(...skipping 27 matching lines...) Expand all
38 } 38 }
39 39
40 namespace extensions { 40 namespace extensions {
41 class EventPageTracker; 41 class EventPageTracker;
42 class Extension; 42 class Extension;
43 } 43 }
44 44
45 namespace media_router { 45 namespace media_router {
46 46
47 enum class MediaRouteProviderWakeReason; 47 enum class MediaRouteProviderWakeReason;
48 class CastMediaSinkService;
48 class DialMediaSinkServiceProxy; 49 class DialMediaSinkServiceProxy;
49 50
50 // MediaRouter implementation that delegates calls to the component extension. 51 // MediaRouter implementation that delegates calls to the component extension.
51 // Also handles the suspension and wakeup of the component extension. 52 // Also handles the suspension and wakeup of the component extension.
52 // Lives on the UI thread. 53 // Lives on the UI thread.
53 class MediaRouterMojoImpl : public MediaRouterBase, 54 class MediaRouterMojoImpl : public MediaRouterBase,
54 public mojom::MediaRouter { 55 public mojom::MediaRouter {
55 public: 56 public:
56 ~MediaRouterMojoImpl() override; 57 ~MediaRouterMojoImpl() override;
57 58
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 // initial event page wakeup attempt. 471 // initial event page wakeup attempt.
471 bool provider_version_was_recorded_ = false; 472 bool provider_version_was_recorded_ = false;
472 473
473 // Stores route controllers that can be used to send media commands to the 474 // Stores route controllers that can be used to send media commands to the
474 // extension. 475 // extension.
475 std::unordered_map<MediaRoute::Id, MediaRouteController*> route_controllers_; 476 std::unordered_map<MediaRoute::Id, MediaRouteController*> route_controllers_;
476 477
477 // Media sink service for DIAL devices. 478 // Media sink service for DIAL devices.
478 scoped_refptr<DialMediaSinkServiceProxy> dial_media_sink_service_proxy_; 479 scoped_refptr<DialMediaSinkServiceProxy> dial_media_sink_service_proxy_;
479 480
481 // Media sink service for CAST devices.
482 scoped_refptr<CastMediaSinkService> cast_media_sink_service_;
483
480 content::BrowserContext* const context_; 484 content::BrowserContext* const context_;
481 485
482 #if defined(OS_WIN) 486 #if defined(OS_WIN)
483 // A pair of flags to ensure that mDNS discovery is only enabled on Windows 487 // A pair of flags to ensure that mDNS discovery is only enabled on Windows
484 // when there will be appropriate context for the user to associate a firewall 488 // when there will be appropriate context for the user to associate a firewall
485 // prompt with Media Router. |should_enable_mdns_discovery_| can only go from 489 // prompt with Media Router. |should_enable_mdns_discovery_| can only go from
486 // |false| to |true|. On Windows, |is_mdns_enabled_| is set to |false| in 490 // |false| to |true|. On Windows, |is_mdns_enabled_| is set to |false| in
487 // RegisterMediaRouteProvider and only set to |true| when we successfully call 491 // RegisterMediaRouteProvider and only set to |true| when we successfully call
488 // the extension to enable mDNS. 492 // the extension to enable mDNS.
489 bool is_mdns_enabled_ = false; 493 bool is_mdns_enabled_ = false;
490 bool should_enable_mdns_discovery_ = false; 494 bool should_enable_mdns_discovery_ = false;
491 #endif 495 #endif
492 496
493 base::WeakPtrFactory<MediaRouterMojoImpl> weak_factory_; 497 base::WeakPtrFactory<MediaRouterMojoImpl> weak_factory_;
494 498
495 DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoImpl); 499 DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoImpl);
496 }; 500 };
497 501
498 } // namespace media_router 502 } // namespace media_router
499 503
500 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_IMPL_H_ 504 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698