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

Unified Diff: chrome/browser/media/router/media_router_base.h

Issue 2294973002: Create MediaRouterActionController and MediaRouterUIService (Closed)
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/media/router/media_router_base.h
diff --git a/chrome/browser/media/router/media_router_base.h b/chrome/browser/media/router/media_router_base.h
index a4c46521b413558b19631f82bee45976080809b8..1f91871097ab14be5e1e5ffda4efc1b357a5341d 100644
--- a/chrome/browser/media/router/media_router_base.h
+++ b/chrome/browser/media/router/media_router_base.h
@@ -5,7 +5,9 @@
#ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_BASE_H_
#define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_BASE_H_
+#include <memory>
#include <set>
+#include <string>
#include <vector>
#include "base/callback_list.h"
@@ -15,6 +17,11 @@
#include "chrome/browser/media/router/media_route.h"
#include "chrome/browser/media/router/media_router.h"
#include "chrome/browser/media/router/media_routes_observer.h"
+#if !defined(OS_ANDROID)
+#include "chrome/browser/ui/toolbar/media_router_action_controller.h"
+#endif
+
+class Profile;
namespace media_router {
@@ -32,13 +39,18 @@ class MediaRouterBase : public MediaRouter {
// This will terminate all incognito media routes.
void OnIncognitoProfileShutdown() override;
+#if !defined(OS_ANDROID)
+ // Returns the controller for media router toolbar action icon.
+ MediaRouterActionController* GetActionController() override;
+#endif
+
protected:
FRIEND_TEST_ALL_PREFIXES(MediaRouterMojoImplTest,
PresentationConnectionStateChangedCallback);
FRIEND_TEST_ALL_PREFIXES(MediaRouterMojoImplTest,
PresentationConnectionStateChangedCallbackRemoved);
- MediaRouterBase();
+ explicit MediaRouterBase(Profile* profile);
// Generates a unique presentation id. Shared between Android and desktop.
static std::string CreatePresentationId();
@@ -83,6 +95,12 @@ class MediaRouterBase : public MediaRouter {
std::unique_ptr<InternalMediaRoutesObserver> internal_routes_observer_;
bool initialized_;
+ Profile* profile_;
+
+#if !defined(OS_ANDROID)
+ std::unique_ptr<MediaRouterActionController> action_controller_;
mark a. foltz 2016/09/02 22:19:09 Please add a TODO to find an owner for this object
takumif 2016/09/07 21:48:32 Done.
+#endif
+
DISALLOW_COPY_AND_ASSIGN(MediaRouterBase);
};

Powered by Google App Engine
This is Rietveld 408576698