Chromium Code Reviews| Index: chrome/browser/media/router/media_router_mojo_impl.h |
| diff --git a/chrome/browser/media/router/media_router_mojo_impl.h b/chrome/browser/media/router/media_router_mojo_impl.h |
| index 0cc2eafb186a527d76bc271afdaeaef5203c3513..fb32ea453406ca5e1f44cfa83801f2ff46407b64 100644 |
| --- a/chrome/browser/media/router/media_router_mojo_impl.h |
| +++ b/chrome/browser/media/router/media_router_mojo_impl.h |
| @@ -34,6 +34,7 @@ class BrowserContext; |
| namespace extensions { |
| class EventPageTracker; |
| +class Extension; |
| } |
| namespace media_router { |
| @@ -49,15 +50,15 @@ class MediaRouterMojoImpl : public MediaRouterBase, |
| // Sets up the MediaRouterMojoImpl instance owned by |context| to handle |
| // MediaRouterObserver requests from the component extension given by |
| - // |extension_id|. Creates the MediaRouterMojoImpl instance if it does not |
| + // |extension|. Creates the MediaRouterMojoImpl instance if it does not |
| // exist. |
| // Called by the Mojo module registry. |
| - // |extension_id|: The ID of the component extension, used for querying |
| + // |extension|: The component extension, used for querying |
| // suspension state. |
| // |context|: The BrowserContext which owns the extension process. |
| // |request|: The Mojo connection request used for binding. |
| static void BindToRequest( |
| - const std::string& extension_id, |
| + const extensions::Extension* extension, |
| content::BrowserContext* context, |
| mojo::InterfaceRequest<interfaces::MediaRouter> request); |
| @@ -181,10 +182,10 @@ class MediaRouterMojoImpl : public MediaRouterBase, |
| // Binds |this| to a Mojo interface request, so that clients can acquire a |
| // handle to a MediaRouterMojoImpl instance via the Mojo service connector. |
| - // Stores the |extension_id| of the component extension. |
| + // Stores the ID of |extension| in |media_route_provider_extension_id_|. |
| void BindToMojoRequest( |
| mojo::InterfaceRequest<interfaces::MediaRouter> request, |
| - const std::string& extension_id); |
| + const extensions::Extension& extension); |
| // Enqueues a closure for later execution by ExecutePendingRequests(). |
| void EnqueueTask(const base::Closure& closure); |
| @@ -373,6 +374,10 @@ class MediaRouterMojoImpl : public MediaRouterBase, |
| // MediaRouteProviderWakeReason::TOTAL_COUNT if there is no pending reason. |
| MediaRouteProviderWakeReason current_wake_reason_; |
| + // A flag to ensure that we record the provider version once, during the |
| + // initial event page wakeup attempt. |
| + bool provider_version_recorded_; |
|
Wez
2016/03/18 18:35:43
nit: Suggest was_provider_version_recorded_ or hav
mark a. foltz
2016/03/18 20:11:00
Done.
|
| + |
| base::WeakPtrFactory<MediaRouterMojoImpl> weak_factory_; |
| DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoImpl); |