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

Unified Diff: chrome/browser/media/android/router/media_router_dialog_controller_android.h

Issue 1228863005: [MediaRouter] The minimal change to make everything build on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed the include for MediaRouterDialogControllerImpl Created 5 years, 5 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/android/router/media_router_dialog_controller_android.h
diff --git a/chrome/browser/media/android/router/media_router_dialog_controller_android.h b/chrome/browser/media/android/router/media_router_dialog_controller_android.h
new file mode 100644
index 0000000000000000000000000000000000000000..f02dc33b662976d62d9935e2f838213d1266a6e5
--- /dev/null
+++ b/chrome/browser/media/android/router/media_router_dialog_controller_android.h
@@ -0,0 +1,44 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_MEDIA_ANDROID_ROUTER_MEDIA_ROUTER_DIALOG_CONTROLLER_ANDROID_H_
+#define CHROME_BROWSER_MEDIA_ANDROID_ROUTER_MEDIA_ROUTER_DIALOG_CONTROLLER_ANDROID_H_
+
+#include "base/macros.h"
+#include "chrome/browser/media/router/media_router_dialog_controller.h"
+#include "content/public/browser/web_contents_observer.h"
+#include "content/public/browser/web_contents_user_data.h"
+
+namespace media_router {
+
+// Android implementation of the MediaRouterDialogController.
+class MediaRouterDialogControllerAndroid
+ : public content::WebContentsUserData<MediaRouterDialogControllerAndroid>,
+ public MediaRouterDialogController {
+ public:
+ ~MediaRouterDialogControllerAndroid() override;
+
+ static MediaRouterDialogControllerAndroid* GetOrCreateForWebContents(
+ content::WebContents* web_contents);
+
+ // MediaRouterDialogController implementation.
+ bool ShowMediaRouterDialogForPresentation(
+ scoped_ptr<CreatePresentationSessionRequest> request) override;
+
+ private:
+ friend class content::WebContentsUserData<MediaRouterDialogControllerAndroid>;
+
+ // Use MediaRouterDialogControllerAndroid::CreateForWebContents() to create an
+ // instance.
+ explicit MediaRouterDialogControllerAndroid(
+ content::WebContents* web_contents);
+
+ base::ThreadChecker thread_checker_;
+
+ DISALLOW_COPY_AND_ASSIGN(MediaRouterDialogControllerAndroid);
+};
+
+} // namespace media_router
+
+#endif // CHROME_BROWSER_MEDIA_ANDROID_ROUTER_MEDIA_ROUTER_DIALOG_CONTROLLER_ANDROID_H_

Powered by Google App Engine
This is Rietveld 408576698