| 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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 new BrowserPluginMsg_SetCursor(guest_->browser_plugin_instance_id(), | 357 new BrowserPluginMsg_SetCursor(guest_->browser_plugin_instance_id(), |
| 357 cursor)); | 358 cursor)); |
| 358 | 359 |
| 359 } | 360 } |
| 360 | 361 |
| 361 void RenderWidgetHostViewGuest::SetIsLoading(bool is_loading) { | 362 void RenderWidgetHostViewGuest::SetIsLoading(bool is_loading) { |
| 362 platform_view_->SetIsLoading(is_loading); | 363 platform_view_->SetIsLoading(is_loading); |
| 363 } | 364 } |
| 364 | 365 |
| 365 void RenderWidgetHostViewGuest::TextInputStateChanged( | 366 void RenderWidgetHostViewGuest::TextInputStateChanged( |
| 366 const ViewHostMsg_TextInputState_Params& params) { | 367 const TextInputState& params) { |
| 367 if (!guest_) | 368 if (!guest_) |
| 368 return; | 369 return; |
| 369 | 370 |
| 370 RenderWidgetHostViewBase* rwhv = GetOwnerRenderWidgetHostView(); | 371 RenderWidgetHostViewBase* rwhv = GetOwnerRenderWidgetHostView(); |
| 371 if (!rwhv) | 372 if (!rwhv) |
| 372 return; | 373 return; |
| 373 // Forward the information to embedding RWHV. | 374 // Forward the information to embedding RWHV. |
| 374 rwhv->TextInputStateChanged(params); | 375 rwhv->TextInputStateChanged(params); |
| 375 } | 376 } |
| 376 | 377 |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 640 if (gesture_event.type == blink::WebInputEvent::GestureScrollUpdate && | 641 if (gesture_event.type == blink::WebInputEvent::GestureScrollUpdate && |
| 641 gesture_event.data.scrollUpdate.inertial) { | 642 gesture_event.data.scrollUpdate.inertial) { |
| 642 return; | 643 return; |
| 643 } | 644 } |
| 644 host_->ForwardGestureEvent(gesture_event); | 645 host_->ForwardGestureEvent(gesture_event); |
| 645 return; | 646 return; |
| 646 } | 647 } |
| 647 } | 648 } |
| 648 | 649 |
| 649 } // namespace content | 650 } // namespace content |
| OLD | NEW |