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

Side by Side Diff: remoting/client/jni/chromoting_jni_runtime.cc

Issue 2084123002: Adding an interface to allow extension of the audio player for CRD and iOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing unused counter in fake audio consumer. Created 4 years, 6 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 | « remoting/client/fake_audio_consumer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "remoting/client/jni/chromoting_jni_runtime.h" 5 #include "remoting/client/jni/chromoting_jni_runtime.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_array.h" 8 #include "base/android/jni_array.h"
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "base/android/library_loader/library_loader_hooks.h" 10 #include "base/android/library_loader/library_loader_hooks.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 // ChromotingJniRuntime implementation. 63 // ChromotingJniRuntime implementation.
64 64
65 // static 65 // static
66 ChromotingJniRuntime* ChromotingJniRuntime::GetInstance() { 66 ChromotingJniRuntime* ChromotingJniRuntime::GetInstance() {
67 return base::Singleton<ChromotingJniRuntime>::get(); 67 return base::Singleton<ChromotingJniRuntime>::get();
68 } 68 }
69 69
70 ChromotingJniRuntime::ChromotingJniRuntime() { 70 ChromotingJniRuntime::ChromotingJniRuntime() {
71 // Grab or create the threads. 71 // Grab or create the threads.
72 // TODO(nicholss) We could runtime this as a constructor argument when jni 72 // TODO(nicholss): We could runtime this as a constructor argument when jni
73 // runtime is not no longer a singleton. 73 // runtime is not no longer a singleton.
74 74
75 if (!base::MessageLoop::current()) { 75 if (!base::MessageLoop::current()) {
76 VLOG(1) << "Starting main message loop"; 76 VLOG(1) << "Starting main message loop";
77 // On Android, the UI thread is managed by Java, so we need to attach and 77 // On Android, the UI thread is managed by Java, so we need to attach and
78 // start a special type of message loop to allow Chromium code to run tasks. 78 // start a special type of message loop to allow Chromium code to run tasks.
79 ui_loop_.reset(new base::MessageLoopForUI()); 79 ui_loop_.reset(new base::MessageLoopForUI());
80 ui_loop_->Start(); 80 ui_loop_->Start();
81 } else { 81 } else {
82 VLOG(1) << "Using existing main message loop"; 82 VLOG(1) << "Using existing main message loop";
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 logger_->Start( 132 logger_->Start(
133 base::WrapUnique( 133 base::WrapUnique(
134 new ChromiumUrlRequestFactory(runtime_->url_requester())), 134 new ChromiumUrlRequestFactory(runtime_->url_requester())),
135 kTelemetryBaseUrl); 135 kTelemetryBaseUrl);
136 logger_->SetAuthClosure( 136 logger_->SetAuthClosure(
137 base::Bind(&ChromotingJniRuntime::FetchAuthToken, 137 base::Bind(&ChromotingJniRuntime::FetchAuthToken,
138 base::Unretained(this))); 138 base::Unretained(this)));
139 } 139 }
140 140
141 } // namespace remoting 141 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/fake_audio_consumer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698