| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/frame_host/render_widget_host_view_guest.h" | 5 #include "content/browser/frame_host/render_widget_host_view_guest.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
| 13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
| 14 #include "cc/surfaces/surface.h" | 14 #include "cc/surfaces/surface.h" |
| 15 #include "cc/surfaces/surface_factory.h" | 15 #include "cc/surfaces/surface_factory.h" |
| 16 #include "cc/surfaces/surface_manager.h" | 16 #include "cc/surfaces/surface_manager.h" |
| 17 #include "cc/surfaces/surface_sequence.h" | 17 #include "cc/surfaces/surface_sequence.h" |
| 18 #include "content/browser/browser_plugin/browser_plugin_guest.h" | 18 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
| 19 #include "content/browser/compositor/surface_utils.h" | 19 #include "content/browser/compositor/surface_utils.h" |
| 20 #include "content/browser/renderer_host/render_view_host_impl.h" | 20 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 21 #include "content/browser/renderer_host/render_widget_host_delegate.h" | 21 #include "content/browser/renderer_host/render_widget_host_delegate.h" |
| 22 #include "content/browser/renderer_host/render_widget_host_input_event_router.h" | 22 #include "content/browser/renderer_host/render_widget_host_input_event_router.h" |
| 23 #include "content/common/browser_plugin/browser_plugin_messages.h" | 23 #include "content/common/browser_plugin/browser_plugin_messages.h" |
| 24 #include "content/common/frame_messages.h" | 24 #include "content/common/frame_messages.h" |
| 25 #include "content/common/gpu/gpu_messages.h" | 25 #include "content/common/gpu/gpu_messages.h" |
| 26 #include "content/common/input/web_touch_event_traits.h" | 26 #include "content/common/input/web_touch_event_traits.h" |
| 27 #include "content/common/text_input_state.h" |
| 27 #include "content/common/view_messages.h" | 28 #include "content/common/view_messages.h" |
| 28 #include "content/common/webplugin_geometry.h" | 29 #include "content/common/webplugin_geometry.h" |
| 29 #include "content/public/common/content_switches.h" | 30 #include "content/public/common/content_switches.h" |
| 30 #include "skia/ext/platform_canvas.h" | 31 #include "skia/ext/platform_canvas.h" |
| 31 #include "third_party/WebKit/public/platform/WebScreenInfo.h" | 32 #include "third_party/WebKit/public/platform/WebScreenInfo.h" |
| 32 | 33 |
| 33 #if defined(OS_MACOSX) | 34 #if defined(OS_MACOSX) |
| 34 #import "content/browser/renderer_host/render_widget_host_view_mac_dictionary_he
lper.h" | 35 #import "content/browser/renderer_host/render_widget_host_view_mac_dictionary_he
lper.h" |
| 35 #endif | 36 #endif |
| 36 | 37 |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 new BrowserPluginMsg_SetCursor(guest_->browser_plugin_instance_id(), | 342 new BrowserPluginMsg_SetCursor(guest_->browser_plugin_instance_id(), |
| 342 cursor)); | 343 cursor)); |
| 343 | 344 |
| 344 } | 345 } |
| 345 | 346 |
| 346 void RenderWidgetHostViewGuest::SetIsLoading(bool is_loading) { | 347 void RenderWidgetHostViewGuest::SetIsLoading(bool is_loading) { |
| 347 platform_view_->SetIsLoading(is_loading); | 348 platform_view_->SetIsLoading(is_loading); |
| 348 } | 349 } |
| 349 | 350 |
| 350 void RenderWidgetHostViewGuest::TextInputStateChanged( | 351 void RenderWidgetHostViewGuest::TextInputStateChanged( |
| 351 const ViewHostMsg_TextInputState_Params& params) { | 352 const TextInputState& params) { |
| 352 if (!guest_) | 353 if (!guest_) |
| 353 return; | 354 return; |
| 354 | 355 |
| 355 RenderWidgetHostViewBase* rwhv = GetOwnerRenderWidgetHostView(); | 356 RenderWidgetHostViewBase* rwhv = GetOwnerRenderWidgetHostView(); |
| 356 if (!rwhv) | 357 if (!rwhv) |
| 357 return; | 358 return; |
| 358 // Forward the information to embedding RWHV. | 359 // Forward the information to embedding RWHV. |
| 359 rwhv->TextInputStateChanged(params); | 360 rwhv->TextInputStateChanged(params); |
| 360 } | 361 } |
| 361 | 362 |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 628 if (gesture_event.type == blink::WebInputEvent::GestureScrollUpdate && | 629 if (gesture_event.type == blink::WebInputEvent::GestureScrollUpdate && |
| 629 gesture_event.data.scrollUpdate.inertial) { | 630 gesture_event.data.scrollUpdate.inertial) { |
| 630 return; | 631 return; |
| 631 } | 632 } |
| 632 host_->ForwardGestureEvent(gesture_event); | 633 host_->ForwardGestureEvent(gesture_event); |
| 633 return; | 634 return; |
| 634 } | 635 } |
| 635 } | 636 } |
| 636 | 637 |
| 637 } // namespace content | 638 } // namespace content |
| OLD | NEW |