summaryrefslogtreecommitdiffstats
path: root/remoting/client
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-19 06:28:51 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-19 06:28:51 +0000
commitfd495c25ccc4448f41ad188e602582c9032ef5d2 (patch)
treed9285256eaa07a0dd06843139d7765c3faefafb6 /remoting/client
parentadc6cfd8f88b7841fb6e040d6ce0197b1aec0438 (diff)
downloadchromium_src-fd495c25ccc4448f41ad188e602582c9032ef5d2.zip
chromium_src-fd495c25ccc4448f41ad188e602582c9032ef5d2.tar.gz
chromium_src-fd495c25ccc4448f41ad188e602582c9032ef5d2.tar.bz2
Revert 271343 "Build remoting for PNaCl"
> Build remoting for PNaCl > > BUG=276739 > R=jamiewalch@chromium.org, rsleevi@chromium.org > > Review URL: https://codereview.chromium.org/234023003 TBR=sergeyu@chromium.org Review URL: https://codereview.chromium.org/285243003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271344 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/client')
-rw-r--r--remoting/client/plugin/chromoting_instance.cc43
-rw-r--r--remoting/client/plugin/chromoting_instance.h7
-rw-r--r--remoting/client/plugin/pepper_module.cc32
3 files changed, 11 insertions, 71 deletions
diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc
index 8a07ecb..3504c71 100644
--- a/remoting/client/plugin/chromoting_instance.cc
+++ b/remoting/client/plugin/chromoting_instance.cc
@@ -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 @@ ChromotingInstance::ChromotingInstance(PP_Instance pp_instance)
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 @@ bool ChromotingInstance::Init(uint32_t argc,
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::HandleMessage(const pp::Var& message) {
void ChromotingInstance::DidChangeFocus(bool has_focus) {
DCHECK(plugin_task_runner_->BelongsToCurrentThread());
- if (!IsConnected())
- return;
-
input_handler_.DidChangeFocus(has_focus);
}
@@ -650,6 +627,8 @@ void ChromotingInstance::ConnectWithConfig(const ClientConfig& config,
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 {
diff --git a/remoting/client/plugin/chromoting_instance.h b/remoting/client/plugin/chromoting_instance.h
index f56074d..0ed6d3d 100644
--- a/remoting/client/plugin/chromoting_instance.h
+++ b/remoting/client/plugin/chromoting_instance.h
@@ -13,7 +13,6 @@
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
-#include "base/thread_task_runner_handle.h"
#include "ppapi/c/pp_instance.h"
#include "ppapi/c/pp_rect.h"
#include "ppapi/c/pp_resource.h"
@@ -46,10 +45,6 @@ class Module;
class VarDictionary;
} // namespace pp
-namespace jingle_glue {
-class JingleThreadWrapper;
-} // namespace jingle_glue
-
namespace webrtc {
class DesktopRegion;
class DesktopSize;
@@ -264,8 +259,6 @@ class ChromotingInstance :
PepperPluginThreadDelegate plugin_thread_delegate_;
scoped_refptr<PluginThreadTaskRunner> plugin_task_runner_;
- scoped_ptr<base::ThreadTaskRunnerHandle> thread_task_runner_handle_;
- scoped_ptr<jingle_glue::JingleThreadWrapper> thread_wrapper_;
ClientContext context_;
scoped_ptr<VideoRenderer> video_renderer_;
scoped_ptr<PepperView> view_;
diff --git a/remoting/client/plugin/pepper_module.cc b/remoting/client/plugin/pepper_module.cc
deleted file mode 100644
index b8e3bc5..0000000
--- a/remoting/client/plugin/pepper_module.cc
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/at_exit.h"
-#include "base/compiler_specific.h"
-#include "ppapi/cpp/instance.h"
-#include "ppapi/cpp/module.h"
-#include "remoting/client/plugin/chromoting_instance.h"
-
-namespace remoting {
-
-class ChromotingModule : public pp::Module {
- protected:
- virtual pp::Instance* CreateInstance(PP_Instance instance) OVERRIDE {
- pp::Instance* result = new ChromotingInstance(instance);
- return result;
- }
- private:
- base::AtExitManager at_exit_manager_;
-};
-
-} // namespace remoting
-
-namespace pp {
-
-// Factory function for your specialization of the Module object.
-Module* CreateModule() {
- return new remoting::ChromotingModule();
-}
-
-} // namespace pp