| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 if (input_event->type == WebInputEvent::MouseMove && | 324 if (input_event->type == WebInputEvent::MouseMove && |
| 325 (!paint_rect_.IsEmpty() || !scroll_rect_.IsEmpty())) { | 325 (!paint_rect_.IsEmpty() || !scroll_rect_.IsEmpty())) { |
| 326 // We want to rate limit the input events in this case, so we'll wait for | 326 // We want to rate limit the input events in this case, so we'll wait for |
| 327 // painting to finish before ACKing this message. | 327 // painting to finish before ACKing this message. |
| 328 pending_input_event_ack_.reset(response); | 328 pending_input_event_ack_.reset(response); |
| 329 } else { | 329 } else { |
| 330 Send(response); | 330 Send(response); |
| 331 } | 331 } |
| 332 | 332 |
| 333 handling_input_event_ = false; | 333 handling_input_event_ = false; |
| 334 |
| 335 WebInputEvent::Type type = input_event->type; |
| 336 if (type == WebInputEvent::RawKeyDown || type == WebInputEvent::KeyDown || |
| 337 type == WebInputEvent::KeyUp || type == WebInputEvent::Char) |
| 338 DidHandleKeyEvent(); |
| 334 } | 339 } |
| 335 | 340 |
| 336 void RenderWidget::OnMouseCaptureLost() { | 341 void RenderWidget::OnMouseCaptureLost() { |
| 337 if (webwidget_) | 342 if (webwidget_) |
| 338 webwidget_->mouseCaptureLost(); | 343 webwidget_->mouseCaptureLost(); |
| 339 } | 344 } |
| 340 | 345 |
| 341 void RenderWidget::OnSetFocus(bool enable) { | 346 void RenderWidget::OnSetFocus(bool enable) { |
| 342 has_focus_ = enable; | 347 has_focus_ = enable; |
| 343 if (webwidget_) | 348 if (webwidget_) |
| (...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 899 | 904 |
| 900 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) { | 905 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) { |
| 901 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin(); | 906 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin(); |
| 902 i != plugin_window_moves_.end(); ++i) { | 907 i != plugin_window_moves_.end(); ++i) { |
| 903 if (i->window == window) { | 908 if (i->window == window) { |
| 904 plugin_window_moves_.erase(i); | 909 plugin_window_moves_.erase(i); |
| 905 break; | 910 break; |
| 906 } | 911 } |
| 907 } | 912 } |
| 908 } | 913 } |
| OLD | NEW |