| OLD | NEW |
| 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 "content/browser/browser_plugin/browser_plugin_guest.h" | 5 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "content/browser/browser_plugin/browser_plugin_embedder.h" | 10 #include "content/browser/browser_plugin/browser_plugin_embedder.h" |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 web_contents()->GetRenderViewHost()); | 412 web_contents()->GetRenderViewHost()); |
| 413 | 413 |
| 414 IPC::Message* message = NULL; | 414 IPC::Message* message = NULL; |
| 415 | 415 |
| 416 // TODO(fsamuel): What should we do for keyboard_shortcut field? | 416 // TODO(fsamuel): What should we do for keyboard_shortcut field? |
| 417 if (event->type == WebKit::WebInputEvent::KeyDown) { | 417 if (event->type == WebKit::WebInputEvent::KeyDown) { |
| 418 CHECK_EQ(sizeof(WebKit::WebKeyboardEvent), event->size); | 418 CHECK_EQ(sizeof(WebKit::WebKeyboardEvent), event->size); |
| 419 WebKit::WebKeyboardEvent key_event; | 419 WebKit::WebKeyboardEvent key_event; |
| 420 memcpy(&key_event, event, event->size); | 420 memcpy(&key_event, event, event->size); |
| 421 key_event.type = WebKit::WebInputEvent::RawKeyDown; | 421 key_event.type = WebKit::WebInputEvent::RawKeyDown; |
| 422 message = new ViewMsg_HandleInputEvent(routing_id(), &key_event, false); | 422 message = new ViewMsg_HandleInputEvent(routing_id(), 0, &key_event, false); |
| 423 } else { | 423 } else { |
| 424 message = new ViewMsg_HandleInputEvent(routing_id(), event, false); | 424 message = new ViewMsg_HandleInputEvent(routing_id(), 0, event, false); |
| 425 } | 425 } |
| 426 | 426 |
| 427 guest_rvh->Send(message); | 427 guest_rvh->Send(message); |
| 428 guest_rvh->StartHangMonitorTimeout(guest_hang_timeout_); | 428 guest_rvh->StartHangMonitorTimeout(guest_hang_timeout_); |
| 429 } | 429 } |
| 430 | 430 |
| 431 void BrowserPluginGuest::OnReload(int instance_id) { | 431 void BrowserPluginGuest::OnReload(int instance_id) { |
| 432 // TODO(fsamuel): Don't check for repost because we don't want to show | 432 // TODO(fsamuel): Don't check for repost because we don't want to show |
| 433 // Chromium's repost warning. We might want to implement a separate API | 433 // Chromium's repost warning. We might want to implement a separate API |
| 434 // for registering a callback if a repost is about to happen. | 434 // for registering a callback if a repost is about to happen. |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 relay_params.scroll_delta = params.scroll_delta; | 646 relay_params.scroll_delta = params.scroll_delta; |
| 647 relay_params.scroll_rect = params.scroll_rect; | 647 relay_params.scroll_rect = params.scroll_rect; |
| 648 relay_params.copy_rects = params.copy_rects; | 648 relay_params.copy_rects = params.copy_rects; |
| 649 | 649 |
| 650 SendMessageToEmbedder(new BrowserPluginMsg_UpdateRect(embedder_routing_id(), | 650 SendMessageToEmbedder(new BrowserPluginMsg_UpdateRect(embedder_routing_id(), |
| 651 instance_id(), | 651 instance_id(), |
| 652 relay_params)); | 652 relay_params)); |
| 653 } | 653 } |
| 654 | 654 |
| 655 } // namespace content | 655 } // namespace content |
| OLD | NEW |