| Index: remoting/client/plugin/chromoting_instance.cc
|
| diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc
|
| index a56955278e0eefbcbec13dee594ab4ff3fce0d4b..47c8eafdafd5c6bb8dc3db9e61c50bdcf804c836 100644
|
| --- a/remoting/client/plugin/chromoting_instance.cc
|
| +++ b/remoting/client/plugin/chromoting_instance.cc
|
| @@ -39,7 +39,6 @@
|
| #include "remoting/client/chromoting_client.h"
|
| #include "remoting/client/frame_consumer_proxy.h"
|
| #include "remoting/client/plugin/delegating_signal_strategy.h"
|
| -#include "remoting/client/plugin/media_source_video_renderer.h"
|
| #include "remoting/client/plugin/normalizing_input_filter_cros.h"
|
| #include "remoting/client/plugin/normalizing_input_filter_mac.h"
|
| #include "remoting/client/plugin/pepper_audio_player.h"
|
| @@ -177,8 +176,7 @@ logging::LogMessageHandlerFunction g_logging_old_handler = NULL;
|
| const char ChromotingInstance::kApiFeatures[] =
|
| "highQualityScaling injectKeyEvent sendClipboardItem remapKey trapKey "
|
| "notifyClientResolution pauseVideo pauseAudio asyncPin thirdPartyAuth "
|
| - "pinlessAuth extensionMessage allowMouseLock mediaSourceRendering "
|
| - "videoControl";
|
| + "pinlessAuth extensionMessage allowMouseLock videoControl";
|
|
|
| const char ChromotingInstance::kRequestedCapabilities[] = "";
|
| const char ChromotingInstance::kSupportedCapabilities[] = "desktopShape";
|
| @@ -194,7 +192,6 @@ ChromotingInstance::ChromotingInstance(PP_Instance pp_instance)
|
| empty_cursor_filter_(&cursor_setter_),
|
| text_input_controller_(this),
|
| 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
|
| @@ -352,8 +349,6 @@ void ChromotingInstance::HandleMessage(const pp::Var& message) {
|
| HandleExtensionMessage(*data);
|
| } else if (method == "allowMouseLock") {
|
| HandleAllowMouseLockMessage();
|
| - } else if (method == "enableMediaSourceRendering") {
|
| - HandleEnableMediaSourceRendering();
|
| } else if (method == "sendMouseInputWhenUnfocused") {
|
| HandleSendMouseInputWhenUnfocused();
|
| } else if (method == "delegateLargeCursors") {
|
| @@ -633,28 +628,24 @@ void ChromotingInstance::HandleConnect(const base::DictionaryValue& data) {
|
| #endif
|
| input_handler_.set_input_stub(normalizing_input_filter_.get());
|
|
|
| - if (use_media_source_rendering_) {
|
| - video_renderer_.reset(new MediaSourceVideoRenderer(this));
|
| - } else {
|
| - view_.reset(new PepperView(this, &context_));
|
| - view_weak_factory_.reset(
|
| - new base::WeakPtrFactory<FrameConsumer>(view_.get()));
|
| -
|
| - // SoftwareVideoRenderer runs on a separate thread so for now we wrap
|
| - // PepperView with a ref-counted proxy object.
|
| - scoped_refptr<FrameConsumerProxy> consumer_proxy =
|
| - new FrameConsumerProxy(plugin_task_runner_,
|
| - view_weak_factory_->GetWeakPtr());
|
| -
|
| - SoftwareVideoRenderer* renderer =
|
| - new SoftwareVideoRenderer(context_.main_task_runner(),
|
| - context_.decode_task_runner(),
|
| - consumer_proxy);
|
| - view_->Initialize(renderer);
|
| - if (!plugin_view_.is_null())
|
| - view_->SetView(plugin_view_);
|
| - video_renderer_.reset(renderer);
|
| - }
|
| + view_.reset(new PepperView(this, &context_));
|
| + view_weak_factory_.reset(
|
| + new base::WeakPtrFactory<FrameConsumer>(view_.get()));
|
| +
|
| + // SoftwareVideoRenderer runs on a separate thread so for now we wrap
|
| + // PepperView with a ref-counted proxy object.
|
| + scoped_refptr<FrameConsumerProxy> consumer_proxy =
|
| + new FrameConsumerProxy(plugin_task_runner_,
|
| + view_weak_factory_->GetWeakPtr());
|
| +
|
| + SoftwareVideoRenderer* renderer =
|
| + new SoftwareVideoRenderer(context_.main_task_runner(),
|
| + context_.decode_task_runner(),
|
| + consumer_proxy);
|
| + view_->Initialize(renderer);
|
| + if (!plugin_view_.is_null())
|
| + view_->SetView(plugin_view_);
|
| + video_renderer_.reset(renderer);
|
|
|
| scoped_ptr<AudioPlayer> audio_player(new PepperAudioPlayer(this));
|
| client_.reset(new ChromotingClient(&context_, this, video_renderer_.get(),
|
| @@ -943,10 +934,6 @@ void ChromotingInstance::HandleAllowMouseLockMessage() {
|
| empty_cursor_filter_.set_cursor_stub(mouse_locker_.get());
|
| }
|
|
|
| -void ChromotingInstance::HandleEnableMediaSourceRendering() {
|
| - use_media_source_rendering_ = true;
|
| -}
|
| -
|
| void ChromotingInstance::HandleSendMouseInputWhenUnfocused() {
|
| input_handler_.set_send_mouse_input_when_unfocused(true);
|
| }
|
| @@ -1139,32 +1126,4 @@ bool ChromotingInstance::IsConnected() {
|
| (client_->connection_state() == protocol::ConnectionToHost::CONNECTED);
|
| }
|
|
|
| -void ChromotingInstance::OnMediaSourceSize(const webrtc::DesktopSize& size,
|
| - const webrtc::DesktopVector& dpi) {
|
| - SetDesktopSize(size, dpi);
|
| -}
|
| -
|
| -void ChromotingInstance::OnMediaSourceShape(
|
| - const webrtc::DesktopRegion& shape) {
|
| - SetDesktopShape(shape);
|
| -}
|
| -
|
| -void ChromotingInstance::OnMediaSourceReset(const std::string& format) {
|
| - scoped_ptr<base::DictionaryValue> data(new base::DictionaryValue());
|
| - data->SetString("format", format);
|
| - PostLegacyJsonMessage("mediaSourceReset", data.Pass());
|
| -}
|
| -
|
| -void ChromotingInstance::OnMediaSourceData(uint8_t* buffer, size_t buffer_size,
|
| - bool keyframe) {
|
| - pp::VarArrayBuffer array_buffer(buffer_size);
|
| - void* data_ptr = array_buffer.Map();
|
| - memcpy(data_ptr, buffer, buffer_size);
|
| - array_buffer.Unmap();
|
| - pp::VarDictionary data_dictionary;
|
| - data_dictionary.Set(pp::Var("buffer"), array_buffer);
|
| - data_dictionary.Set(pp::Var("keyframe"), keyframe);
|
| - PostChromotingMessage("mediaSourceData", data_dictionary);
|
| -}
|
| -
|
| } // namespace remoting
|
|
|