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

Side by Side Diff: chrome/renderer/render_widget.cc

Issue 27244: Don't send WebInputEvents from the renderer to the browser.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "chrome/renderer/render_widget.h" 5 #include "chrome/renderer/render_widget.h"
6 6
7 #include "base/gfx/point.h" 7 #include "base/gfx/point.h"
8 #include "base/gfx/size.h" 8 #include "base/gfx/size.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 return; 260 return;
261 261
262 const WebInputEvent* input_event = 262 const WebInputEvent* input_event =
263 reinterpret_cast<const WebInputEvent*>(data); 263 reinterpret_cast<const WebInputEvent*>(data);
264 bool processed = false; 264 bool processed = false;
265 if (webwidget_) 265 if (webwidget_)
266 processed = webwidget_->HandleInputEvent(input_event); 266 processed = webwidget_->HandleInputEvent(input_event);
267 267
268 IPC::Message* response = new ViewHostMsg_HandleInputEvent_ACK(routing_id_); 268 IPC::Message* response = new ViewHostMsg_HandleInputEvent_ACK(routing_id_);
269 response->WriteInt(input_event->type); 269 response->WriteInt(input_event->type);
270 if (!processed) { 270 response->WriteBool(processed);
271 // If the event was not processed we send it back. 271
272 response->WriteData(data, data_length);
273 }
274 Send(response); 272 Send(response);
275 } 273 }
276 274
277 void RenderWidget::OnMouseCaptureLost() { 275 void RenderWidget::OnMouseCaptureLost() {
278 if (webwidget_) 276 if (webwidget_)
279 webwidget_->MouseCaptureLost(); 277 webwidget_->MouseCaptureLost();
280 } 278 }
281 279
282 void RenderWidget::OnSetFocus(bool enable) { 280 void RenderWidget::OnSetFocus(bool enable) {
283 has_focus_ = enable; 281 has_focus_ = enable;
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 for (; i < plugin_window_moves_.size(); ++i) { 735 for (; i < plugin_window_moves_.size(); ++i) {
738 if (plugin_window_moves_[i].window == move.window) { 736 if (plugin_window_moves_[i].window == move.window) {
739 plugin_window_moves_[i] = move; 737 plugin_window_moves_[i] = move;
740 break; 738 break;
741 } 739 }
742 } 740 }
743 741
744 if (i == plugin_window_moves_.size()) 742 if (i == plugin_window_moves_.size())
745 plugin_window_moves_.push_back(move); 743 plugin_window_moves_.push_back(move);
746 } 744 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698