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

Side by Side Diff: remoting/client/plugin/chromoting_instance.cc

Issue 16140022: Issue 245137: Mouse-move events not sent after clicking on drop-down toolbar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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
OLDNEW
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 <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 void ChromotingInstance::DidChangeView(const pp::View& view) { 431 void ChromotingInstance::DidChangeView(const pp::View& view) {
432 DCHECK(plugin_task_runner_->BelongsToCurrentThread()); 432 DCHECK(plugin_task_runner_->BelongsToCurrentThread());
433 433
434 plugin_view_ = view; 434 plugin_view_ = view;
435 if (view_) { 435 if (view_) {
436 view_->SetView(view); 436 view_->SetView(view);
437 mouse_input_filter_.set_input_size(view_->get_view_size_dips()); 437 mouse_input_filter_.set_input_size(view_->get_view_size_dips());
438 } 438 }
439 } 439 }
440 440
441 void ChromotingInstance::DidChangeFocus(bool has_focus) {
442 DCHECK(plugin_task_runner_->BelongsToCurrentThread());
443
444 input_handler_.OnFocusChanged(has_focus);
445 }
446
447 bool ChromotingInstance::HandleInputEvent(const pp::InputEvent& event) { 441 bool ChromotingInstance::HandleInputEvent(const pp::InputEvent& event) {
448 DCHECK(plugin_task_runner_->BelongsToCurrentThread()); 442 DCHECK(plugin_task_runner_->BelongsToCurrentThread());
449 443
450 if (!IsConnected()) 444 if (!IsConnected())
451 return false; 445 return false;
452 446
453 return input_handler_.HandleInputEvent(event); 447 return input_handler_.HandleInputEvent(event);
454 } 448 }
455 449
456 void ChromotingInstance::SetDesktopSize(const SkISize& size, 450 void ChromotingInstance::SetDesktopSize(const SkISize& size,
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 url_components.scheme.len); 939 url_components.scheme.len);
946 return url_scheme == kChromeExtensionUrlScheme; 940 return url_scheme == kChromeExtensionUrlScheme;
947 } 941 }
948 942
949 bool ChromotingInstance::IsConnected() { 943 bool ChromotingInstance::IsConnected() {
950 return host_connection_.get() && 944 return host_connection_.get() &&
951 (host_connection_->state() == protocol::ConnectionToHost::CONNECTED); 945 (host_connection_->state() == protocol::ConnectionToHost::CONNECTED);
952 } 946 }
953 947
954 } // namespace remoting 948 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/plugin/chromoting_instance.h ('k') | remoting/client/plugin/pepper_input_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698