| Index: trunk/src/remoting/client/plugin/chromoting_instance.cc
|
| ===================================================================
|
| --- trunk/src/remoting/client/plugin/chromoting_instance.cc (revision 271343)
|
| +++ trunk/src/remoting/client/plugin/chromoting_instance.cc (working copy)
|
| @@ -8,11 +8,6 @@
|
| #include <string>
|
| #include <vector>
|
|
|
| -#if defined(OS_NACL)
|
| -#include <sys/mount.h>
|
| -#include <nacl_io/nacl_io.h>
|
| -#endif
|
| -
|
| #include "base/bind.h"
|
| #include "base/callback.h"
|
| #include "base/json/json_reader.h"
|
| @@ -26,7 +21,7 @@
|
| #include "base/values.h"
|
| #include "crypto/random.h"
|
| #include "jingle/glue/thread_wrapper.h"
|
| -#include "media/base/yuv_convert.h"
|
| +#include "media/base/media.h"
|
| #include "net/socket/ssl_server_socket.h"
|
| #include "ppapi/cpp/completion_callback.h"
|
| #include "ppapi/cpp/dev/url_util_dev.h"
|
| @@ -215,24 +210,6 @@
|
| use_async_pin_dialog_(false),
|
| use_media_source_rendering_(false),
|
| weak_factory_(this) {
|
| -#if defined(OS_NACL)
|
| - // In NaCl global resources need to be initialized differently because they
|
| - // are not shared with Chrome.
|
| - thread_task_runner_handle_.reset(
|
| - new base::ThreadTaskRunnerHandle(plugin_task_runner_));
|
| - thread_wrapper_.reset(
|
| - new jingle_glue::JingleThreadWrapper(plugin_task_runner_));
|
| - media::InitializeCPUSpecificYUVConversions();
|
| -#else
|
| - jingle_glue::JingleThreadWrapper::EnsureForCurrentMessageLoop();
|
| -#endif
|
| -
|
| -#if defined(OS_NACL)
|
| - nacl_io_init_ppapi(pp_instance, pp::Module::Get()->get_browser_interface());
|
| - mount("", "/etc", "memfs", 0, "");
|
| - mount("", "/usr", "memfs", 0, "");
|
| -#endif
|
| -
|
| RequestInputEvents(PP_INPUTEVENT_CLASS_MOUSE | PP_INPUTEVENT_CLASS_WHEEL);
|
| RequestFilteringInputEvents(PP_INPUTEVENT_CLASS_KEYBOARD);
|
|
|
| @@ -287,15 +264,18 @@
|
|
|
| VLOG(1) << "Started ChromotingInstance::Init";
|
|
|
| - // Check that the calling content is part of an app or extension. This is only
|
| - // necessary for non-PNaCl version of the plugin. Also PPB_URLUtil_Dev doesn't
|
| - // work in NaCl at the moment so the check fails in NaCl builds.
|
| -#if !defined(OS_NACL)
|
| + // Check to make sure the media library is initialized.
|
| + // http://crbug.com/91521.
|
| + if (!media::IsMediaLibraryInitialized()) {
|
| + LOG(ERROR) << "Media library not initialized.";
|
| + return false;
|
| + }
|
| +
|
| + // Check that the calling content is part of an app or extension.
|
| if (!IsCallerAppOrExtension()) {
|
| LOG(ERROR) << "Not an app or extension";
|
| return false;
|
| }
|
| -#endif
|
|
|
| // Start all the threads.
|
| context_.Start();
|
| @@ -365,9 +345,6 @@
|
| void ChromotingInstance::DidChangeFocus(bool has_focus) {
|
| DCHECK(plugin_task_runner_->BelongsToCurrentThread());
|
|
|
| - if (!IsConnected())
|
| - return;
|
| -
|
| input_handler_.DidChangeFocus(has_focus);
|
| }
|
|
|
| @@ -650,6 +627,8 @@
|
| const std::string& local_jid) {
|
| DCHECK(plugin_task_runner_->BelongsToCurrentThread());
|
|
|
| + jingle_glue::JingleThreadWrapper::EnsureForCurrentMessageLoop();
|
| +
|
| if (use_media_source_rendering_) {
|
| video_renderer_.reset(new MediaSourceVideoRenderer(this));
|
| } else {
|
|
|