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

Side by Side Diff: chrome/browser/media/android/router/media_router_android.cc

Issue 1275893002: [PresentationAPI, Android] Add ChromeMediaRouter.java and bind it with the native MediaRouterAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix failiing DCHECK Created 5 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/media/android/router/media_router_android.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "chrome/browser/media/android/router/media_router_android.h" 5 #include "chrome/browser/media/android/router/media_router_android.h"
6 6
7 #include "base/android/jni_android.h"
7 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "jni/ChromeMediaRouter_jni.h"
8 10
9 namespace media_router { 11 namespace media_router {
10 12
11 MediaRouterAndroid::MediaRouterAndroid(content::BrowserContext*) { 13 MediaRouterAndroid::MediaRouterAndroid(content::BrowserContext*) {
14 JNIEnv* env = base::android::AttachCurrentThread();
15 java_media_router_.Reset(Java_ChromeMediaRouter_create(
16 env,
17 reinterpret_cast<jlong>(this),
18 base::android::GetApplicationContext()));
12 } 19 }
13 20
14 MediaRouterAndroid::~MediaRouterAndroid() { 21 MediaRouterAndroid::~MediaRouterAndroid() {
15 } 22 }
16 23
24 // static
25 bool MediaRouterAndroid::Register(JNIEnv* env) {
26 bool ret = RegisterNativesImpl(env);
27 // No native calls to register just yet.
28 // DCHECK(g_ChromeMediaRouter_clazz);
29 return ret;
30 }
31
17 void MediaRouterAndroid::CreateRoute( 32 void MediaRouterAndroid::CreateRoute(
18 const MediaSource::Id& source_id, 33 const MediaSource::Id& source_id,
19 const MediaSink::Id& sink_id, 34 const MediaSink::Id& sink_id,
20 const GURL& origin, 35 const GURL& origin,
21 int tab_id, 36 int tab_id,
22 const std::vector<MediaRouteResponseCallback>& callbacks) { 37 const std::vector<MediaRouteResponseCallback>& callbacks) {
23 NOTIMPLEMENTED(); 38 NOTIMPLEMENTED();
24 } 39 }
25 void MediaRouterAndroid::JoinRoute( 40 void MediaRouterAndroid::JoinRoute(
26 const MediaSource::Id& source, 41 const MediaSource::Id& source,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 void MediaRouterAndroid::RegisterPresentationSessionMessagesObserver( 88 void MediaRouterAndroid::RegisterPresentationSessionMessagesObserver(
74 PresentationSessionMessagesObserver* observer) { 89 PresentationSessionMessagesObserver* observer) {
75 NOTIMPLEMENTED(); 90 NOTIMPLEMENTED();
76 } 91 }
77 void MediaRouterAndroid::UnregisterPresentationSessionMessagesObserver( 92 void MediaRouterAndroid::UnregisterPresentationSessionMessagesObserver(
78 PresentationSessionMessagesObserver* observer) { 93 PresentationSessionMessagesObserver* observer) {
79 NOTIMPLEMENTED(); 94 NOTIMPLEMENTED();
80 } 95 }
81 96
82 } // namespace media_router 97 } // namespace media_router
OLDNEW
« no previous file with comments | « chrome/browser/media/android/router/media_router_android.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698