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 "base/bind_helpers.h" | 5 #include "base/bind_helpers.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "build/build_config.h" |
9 #include "cc/surfaces/surface.h" | 10 #include "cc/surfaces/surface.h" |
10 #include "cc/surfaces/surface_factory.h" | 11 #include "cc/surfaces/surface_factory.h" |
11 #include "cc/surfaces/surface_manager.h" | 12 #include "cc/surfaces/surface_manager.h" |
12 #include "cc/surfaces/surface_sequence.h" | 13 #include "cc/surfaces/surface_sequence.h" |
13 #include "content/browser/browser_plugin/browser_plugin_guest.h" | 14 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
14 #include "content/browser/compositor/surface_utils.h" | 15 #include "content/browser/compositor/surface_utils.h" |
15 #include "content/browser/frame_host/render_widget_host_view_guest.h" | 16 #include "content/browser/frame_host/render_widget_host_view_guest.h" |
16 #include "content/browser/renderer_host/render_view_host_impl.h" | 17 #include "content/browser/renderer_host/render_view_host_impl.h" |
17 #include "content/browser/renderer_host/render_widget_host_delegate.h" | 18 #include "content/browser/renderer_host/render_widget_host_delegate.h" |
18 #include "content/browser/renderer_host/render_widget_host_input_event_router.h" | 19 #include "content/browser/renderer_host/render_widget_host_input_event_router.h" |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 return platform_view_->GetSelectedText(); | 222 return platform_view_->GetSelectedText(); |
222 } | 223 } |
223 | 224 |
224 void RenderWidgetHostViewGuest::SetTooltipText( | 225 void RenderWidgetHostViewGuest::SetTooltipText( |
225 const base::string16& tooltip_text) { | 226 const base::string16& tooltip_text) { |
226 if (guest_) | 227 if (guest_) |
227 guest_->SetTooltipText(tooltip_text); | 228 guest_->SetTooltipText(tooltip_text); |
228 } | 229 } |
229 | 230 |
230 void RenderWidgetHostViewGuest::OnSwapCompositorFrame( | 231 void RenderWidgetHostViewGuest::OnSwapCompositorFrame( |
231 uint32 output_surface_id, | 232 uint32_t output_surface_id, |
232 scoped_ptr<cc::CompositorFrame> frame) { | 233 scoped_ptr<cc::CompositorFrame> frame) { |
233 if (!guest_ || !guest_->attached()) { | 234 if (!guest_ || !guest_->attached()) { |
234 // We shouldn't hang on to a surface while we are detached. | 235 // We shouldn't hang on to a surface while we are detached. |
235 ClearCompositorSurfaceIfNecessary(); | 236 ClearCompositorSurfaceIfNecessary(); |
236 return; | 237 return; |
237 } | 238 } |
238 | 239 |
239 last_scroll_offset_ = frame->metadata.root_scroll_offset; | 240 last_scroll_offset_ = frame->metadata.root_scroll_offset; |
240 // When not using surfaces, the frame just gets proxied to | 241 // When not using surfaces, the frame just gets proxied to |
241 // the embedder's renderer to be composited. | 242 // the embedder's renderer to be composited. |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
701 if (gesture_event.type == blink::WebInputEvent::GestureScrollUpdate && | 702 if (gesture_event.type == blink::WebInputEvent::GestureScrollUpdate && |
702 gesture_event.data.scrollUpdate.inertial) { | 703 gesture_event.data.scrollUpdate.inertial) { |
703 return; | 704 return; |
704 } | 705 } |
705 host_->ForwardGestureEvent(gesture_event); | 706 host_->ForwardGestureEvent(gesture_event); |
706 return; | 707 return; |
707 } | 708 } |
708 } | 709 } |
709 | 710 |
710 } // namespace content | 711 } // namespace content |
OLD | NEW |