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

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

Issue 1784533004: [Media Router] Add origins to sink query results. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test Created 4 years, 9 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 | « no previous file | chrome/browser/media/router/media_router.mojom » ('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 <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 env, java_media_router_.obj(), jsource_urn, i); 352 env, java_media_router_.obj(), jsource_urn, i);
353 sinks_converted.push_back( 353 sinks_converted.push_back(
354 MediaSink(ConvertJavaStringToUTF8(env, jsink_urn.obj()), 354 MediaSink(ConvertJavaStringToUTF8(env, jsink_urn.obj()),
355 ConvertJavaStringToUTF8(env, jsink_name.obj()), 355 ConvertJavaStringToUTF8(env, jsink_name.obj()),
356 MediaSink::GENERIC)); 356 MediaSink::GENERIC));
357 } 357 }
358 358
359 std::string source_urn = ConvertJavaStringToUTF8(env, jsource_urn); 359 std::string source_urn = ConvertJavaStringToUTF8(env, jsource_urn);
360 auto it = sinks_observers_.find(source_urn); 360 auto it = sinks_observers_.find(source_urn);
361 if (it != sinks_observers_.end()) { 361 if (it != sinks_observers_.end()) {
362 // TODO(imcheng): Pass origins to OnSinksUpdated (crbug.com/594858).
362 FOR_EACH_OBSERVER(MediaSinksObserver, *it->second, 363 FOR_EACH_OBSERVER(MediaSinksObserver, *it->second,
363 OnSinksReceived(sinks_converted)); 364 OnSinksUpdated(sinks_converted, std::vector<GURL>()));
364 } 365 }
365 } 366 }
366 367
367 void MediaRouterAndroid::OnRouteCreated( 368 void MediaRouterAndroid::OnRouteCreated(
368 JNIEnv* env, 369 JNIEnv* env,
369 const JavaParamRef<jobject>& obj, 370 const JavaParamRef<jobject>& obj,
370 const JavaParamRef<jstring>& jmedia_route_id, 371 const JavaParamRef<jstring>& jmedia_route_id,
371 const JavaParamRef<jstring>& jsink_id, 372 const JavaParamRef<jstring>& jsink_id,
372 jint jroute_request_id, 373 jint jroute_request_id,
373 jboolean jis_local) { 374 jboolean jis_local) {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 scoped_ptr<content::PresentationSessionMessage> message( 451 scoped_ptr<content::PresentationSessionMessage> message(
451 new content::PresentationSessionMessage(content::TEXT)); 452 new content::PresentationSessionMessage(content::TEXT));
452 message->message = ConvertJavaStringToUTF8(env, jmessage); 453 message->message = ConvertJavaStringToUTF8(env, jmessage);
453 session_messages.push_back(std::move(message)); 454 session_messages.push_back(std::move(message));
454 455
455 FOR_EACH_OBSERVER(PresentationSessionMessagesObserver, *observer_list, 456 FOR_EACH_OBSERVER(PresentationSessionMessagesObserver, *observer_list,
456 OnMessagesReceived(session_messages, true)); 457 OnMessagesReceived(session_messages, true));
457 } 458 }
458 459
459 } // namespace media_router 460 } // namespace media_router
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/media/router/media_router.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698