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/renderer_host/render_widget_host_view_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1163 legacy_render_widget_host_HWND_ = NULL; | 1163 legacy_render_widget_host_HWND_ = NULL; |
1164 legacy_window_destroyed_ = true; | 1164 legacy_window_destroyed_ = true; |
1165 } | 1165 } |
1166 #endif | 1166 #endif |
1167 | 1167 |
1168 void RenderWidgetHostViewAura::OnSwapCompositorFrame( | 1168 void RenderWidgetHostViewAura::OnSwapCompositorFrame( |
1169 uint32 output_surface_id, | 1169 uint32 output_surface_id, |
1170 scoped_ptr<cc::CompositorFrame> frame) { | 1170 scoped_ptr<cc::CompositorFrame> frame) { |
1171 TRACE_EVENT0("content", "RenderWidgetHostViewAura::OnSwapCompositorFrame"); | 1171 TRACE_EVENT0("content", "RenderWidgetHostViewAura::OnSwapCompositorFrame"); |
1172 | 1172 |
| 1173 if (!focused_node_is_plugin()) { |
| 1174 cc::ViewportSelectionBound start = frame->metadata.selection.start; |
| 1175 fprintf(stderr, "wjm: RWHVA::OnSwapCompositorFrame(%p) Window " |
| 1176 "edge_top=(%6.1f,%6.1f) edge_bottom=(%6.1f,%6.1f)\n", |
| 1177 this, start.edge_top.x(), start.edge_top.y(), |
| 1178 start.edge_bottom.x(), start.edge_bottom.y()); |
| 1179 } else { |
| 1180 // This is just to demonstrate when RWHVA *shouldn't* send selection info. |
| 1181 fprintf(stderr, "wjm: RWHVA::OnSwapCompositorFrame(%p) - not focused\n", |
| 1182 this); |
| 1183 } |
| 1184 |
1173 last_scroll_offset_ = frame->metadata.root_scroll_offset; | 1185 last_scroll_offset_ = frame->metadata.root_scroll_offset; |
1174 if (frame->delegated_frame_data) { | 1186 if (frame->delegated_frame_data) { |
1175 delegated_frame_host_->SwapDelegatedFrame( | 1187 delegated_frame_host_->SwapDelegatedFrame( |
1176 output_surface_id, | 1188 output_surface_id, |
1177 frame->delegated_frame_data.Pass(), | 1189 frame->delegated_frame_data.Pass(), |
1178 frame->metadata.device_scale_factor, | 1190 frame->metadata.device_scale_factor, |
1179 frame->metadata.latency_info); | 1191 frame->metadata.latency_info); |
1180 return; | 1192 return; |
1181 } | 1193 } |
1182 | 1194 |
(...skipping 1617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2800 | 2812 |
2801 //////////////////////////////////////////////////////////////////////////////// | 2813 //////////////////////////////////////////////////////////////////////////////// |
2802 // RenderWidgetHostViewBase, public: | 2814 // RenderWidgetHostViewBase, public: |
2803 | 2815 |
2804 // static | 2816 // static |
2805 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 2817 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
2806 GetScreenInfoForWindow(results, NULL); | 2818 GetScreenInfoForWindow(results, NULL); |
2807 } | 2819 } |
2808 | 2820 |
2809 } // namespace content | 2821 } // namespace content |
OLD | NEW |