| 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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 new BrowserPluginMsg_SetCursor(guest_->browser_plugin_instance_id(), | 344 new BrowserPluginMsg_SetCursor(guest_->browser_plugin_instance_id(), |
| 344 cursor)); | 345 cursor)); |
| 345 | 346 |
| 346 } | 347 } |
| 347 | 348 |
| 348 void RenderWidgetHostViewGuest::SetIsLoading(bool is_loading) { | 349 void RenderWidgetHostViewGuest::SetIsLoading(bool is_loading) { |
| 349 platform_view_->SetIsLoading(is_loading); | 350 platform_view_->SetIsLoading(is_loading); |
| 350 } | 351 } |
| 351 | 352 |
| 352 void RenderWidgetHostViewGuest::TextInputStateChanged( | 353 void RenderWidgetHostViewGuest::TextInputStateChanged( |
| 353 const ViewHostMsg_TextInputState_Params& params) { | 354 const TextInputState& params) { |
| 354 if (!guest_) | 355 if (!guest_) |
| 355 return; | 356 return; |
| 356 | 357 |
| 357 RenderWidgetHostViewBase* rwhv = GetOwnerRenderWidgetHostView(); | 358 RenderWidgetHostViewBase* rwhv = GetOwnerRenderWidgetHostView(); |
| 358 if (!rwhv) | 359 if (!rwhv) |
| 359 return; | 360 return; |
| 360 // Forward the information to embedding RWHV. | 361 // Forward the information to embedding RWHV. |
| 361 rwhv->TextInputStateChanged(params); | 362 rwhv->TextInputStateChanged(params); |
| 362 } | 363 } |
| 363 | 364 |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 630 if (gesture_event.type == blink::WebInputEvent::GestureScrollUpdate && | 631 if (gesture_event.type == blink::WebInputEvent::GestureScrollUpdate && |
| 631 gesture_event.data.scrollUpdate.inertial) { | 632 gesture_event.data.scrollUpdate.inertial) { |
| 632 return; | 633 return; |
| 633 } | 634 } |
| 634 host_->ForwardGestureEvent(gesture_event); | 635 host_->ForwardGestureEvent(gesture_event); |
| 635 return; | 636 return; |
| 636 } | 637 } |
| 637 } | 638 } |
| 638 | 639 |
| 639 } // namespace content | 640 } // namespace content |
| OLD | NEW |