OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/plugin/chromoting_instance.h" | 5 #include "remoting/client/plugin/chromoting_instance.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 delegate_large_cursors_(false), | 221 delegate_large_cursors_(false), |
222 weak_factory_(this) { | 222 weak_factory_(this) { |
223 #if defined(OS_NACL) | 223 #if defined(OS_NACL) |
224 // In NaCl global resources need to be initialized differently because they | 224 // In NaCl global resources need to be initialized differently because they |
225 // are not shared with Chrome. | 225 // are not shared with Chrome. |
226 thread_task_runner_handle_.reset( | 226 thread_task_runner_handle_.reset( |
227 new base::ThreadTaskRunnerHandle(plugin_task_runner_)); | 227 new base::ThreadTaskRunnerHandle(plugin_task_runner_)); |
228 thread_wrapper_.reset( | 228 thread_wrapper_.reset( |
229 new jingle_glue::JingleThreadWrapper(plugin_task_runner_)); | 229 new jingle_glue::JingleThreadWrapper(plugin_task_runner_)); |
230 media::InitializeCPUSpecificYUVConversions(); | 230 media::InitializeCPUSpecificYUVConversions(); |
| 231 |
| 232 // Register a global log handler. |
| 233 ChromotingInstance::RegisterLogMessageHandler(); |
231 #else | 234 #else |
232 jingle_glue::JingleThreadWrapper::EnsureForCurrentMessageLoop(); | 235 jingle_glue::JingleThreadWrapper::EnsureForCurrentMessageLoop(); |
233 #endif | 236 #endif |
234 | 237 |
235 #if defined(OS_NACL) | 238 #if defined(OS_NACL) |
236 nacl_io_init_ppapi(pp_instance, pp::Module::Get()->get_browser_interface()); | 239 nacl_io_init_ppapi(pp_instance, pp::Module::Get()->get_browser_interface()); |
237 mount("", "/etc", "memfs", 0, ""); | 240 mount("", "/etc", "memfs", 0, ""); |
238 mount("", "/usr", "memfs", 0, ""); | 241 mount("", "/usr", "memfs", 0, ""); |
239 #endif | 242 #endif |
240 | 243 |
(...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1237 void* data_ptr = array_buffer.Map(); | 1240 void* data_ptr = array_buffer.Map(); |
1238 memcpy(data_ptr, buffer, buffer_size); | 1241 memcpy(data_ptr, buffer, buffer_size); |
1239 array_buffer.Unmap(); | 1242 array_buffer.Unmap(); |
1240 pp::VarDictionary data_dictionary; | 1243 pp::VarDictionary data_dictionary; |
1241 data_dictionary.Set(pp::Var("buffer"), array_buffer); | 1244 data_dictionary.Set(pp::Var("buffer"), array_buffer); |
1242 data_dictionary.Set(pp::Var("keyframe"), keyframe); | 1245 data_dictionary.Set(pp::Var("keyframe"), keyframe); |
1243 PostChromotingMessage("mediaSourceData", data_dictionary); | 1246 PostChromotingMessage("mediaSourceData", data_dictionary); |
1244 } | 1247 } |
1245 | 1248 |
1246 } // namespace remoting | 1249 } // namespace remoting |
OLD | NEW |