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

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

Issue 3440026: Fix mouse event handling in Chromoting plugin. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 3 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 105
106 view_->SetViewport(position.x(), position.y(), 106 view_->SetViewport(position.x(), position.y(),
107 position.width(), position.height()); 107 position.width(), position.height());
108 view_->Paint(); 108 view_->Paint();
109 } 109 }
110 110
111 bool ChromotingInstance::CurrentlyOnPluginThread() const { 111 bool ChromotingInstance::CurrentlyOnPluginThread() const {
112 return pepper_main_loop_dont_post_to_me_ == MessageLoop::current(); 112 return pepper_main_loop_dont_post_to_me_ == MessageLoop::current();
113 } 113 }
114 114
115 bool ChromotingInstance::HandleEvent(const PP_InputEvent& event) { 115 bool ChromotingInstance::HandleInputEvent(const PP_InputEvent& event) {
116 DCHECK(CurrentlyOnPluginThread()); 116 DCHECK(CurrentlyOnPluginThread());
117 117
118 PepperInputHandler* pih 118 PepperInputHandler* pih
119 = static_cast<PepperInputHandler*>(input_handler_.get()); 119 = static_cast<PepperInputHandler*>(input_handler_.get());
120 120
121 switch (event.type) { 121 switch (event.type) {
122 case PP_INPUTEVENT_TYPE_MOUSEDOWN: 122 case PP_INPUTEVENT_TYPE_MOUSEDOWN:
123 pih->HandleMouseButtonEvent(true, event.u.mouse); 123 pih->HandleMouseButtonEvent(true, event.u.mouse);
124 return true; 124 return true;
125 125
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 158
159 LOG(ERROR) << "Object initted."; 159 LOG(ERROR) << "Object initted.";
160 // The pp::Var takes ownership of object here. 160 // The pp::Var takes ownership of object here.
161 instance_object_ = pp::Var(object); 161 instance_object_ = pp::Var(object);
162 } 162 }
163 163
164 return instance_object_; 164 return instance_object_;
165 } 165 }
166 166
167 } // namespace remoting 167 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/plugin/chromoting_instance.h ('k') | remoting/client/plugin/pepper_input_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698