| 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 #ifndef CONTENT_RENDERER_RENDER_WIDGET_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_WIDGET_H_ |
| 6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ | 6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <map> | 9 #include <map> |
| 10 | 10 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 struct ViewHostMsg_UpdateRect_Params; | 45 struct ViewHostMsg_UpdateRect_Params; |
| 46 struct ViewMsg_Resize_Params; | 46 struct ViewMsg_Resize_Params; |
| 47 class ViewHostMsg_UpdateRect; | 47 class ViewHostMsg_UpdateRect; |
| 48 | 48 |
| 49 namespace IPC { | 49 namespace IPC { |
| 50 class SyncMessage; | 50 class SyncMessage; |
| 51 } | 51 } |
| 52 | 52 |
| 53 namespace blink { | 53 namespace blink { |
| 54 struct WebDeviceEmulationParams; |
| 54 class WebGestureEvent; | 55 class WebGestureEvent; |
| 55 class WebInputEvent; | 56 class WebInputEvent; |
| 56 class WebKeyboardEvent; | 57 class WebKeyboardEvent; |
| 57 class WebMouseEvent; | 58 class WebMouseEvent; |
| 58 class WebTouchEvent; | 59 class WebTouchEvent; |
| 59 } | 60 } |
| 60 | 61 |
| 61 namespace cc { class OutputSurface; } | 62 namespace cc { class OutputSurface; } |
| 62 | 63 |
| 63 namespace gfx { | 64 namespace gfx { |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 | 202 |
| 202 // ScreenMetricsEmulator class manages screen emulation inside a render | 203 // ScreenMetricsEmulator class manages screen emulation inside a render |
| 203 // widget. This includes resizing, placing view on the screen at desired | 204 // widget. This includes resizing, placing view on the screen at desired |
| 204 // position, changing device scale factor, and scaling down the whole | 205 // position, changing device scale factor, and scaling down the whole |
| 205 // widget if required to fit into the browser window. | 206 // widget if required to fit into the browser window. |
| 206 class ScreenMetricsEmulator; | 207 class ScreenMetricsEmulator; |
| 207 | 208 |
| 208 // Emulates screen and widget metrics. Supplied values override everything | 209 // Emulates screen and widget metrics. Supplied values override everything |
| 209 // coming from host. | 210 // coming from host. |
| 210 void EnableScreenMetricsEmulation( | 211 void EnableScreenMetricsEmulation( |
| 211 const gfx::Rect& device_rect, | 212 const blink::WebDeviceEmulationParams& params); |
| 212 const gfx::Rect& widget_rect, | |
| 213 float device_scale_factor, | |
| 214 bool fit_to_view); | |
| 215 void DisableScreenMetricsEmulation(); | 213 void DisableScreenMetricsEmulation(); |
| 216 void SetPopupOriginAdjustmentsForEmulation(ScreenMetricsEmulator* emulator); | 214 void SetPopupOriginAdjustmentsForEmulation(ScreenMetricsEmulator* emulator); |
| 217 | 215 |
| 218 void ScheduleCompositeWithForcedRedraw(); | 216 void ScheduleCompositeWithForcedRedraw(); |
| 219 | 217 |
| 220 // Called by the compositor in single-threaded mode when a swap is posted, | 218 // Called by the compositor in single-threaded mode when a swap is posted, |
| 221 // completes or is aborted. | 219 // completes or is aborted. |
| 222 void OnSwapBuffersPosted(); | 220 void OnSwapBuffersPosted(); |
| 223 void OnSwapBuffersComplete(); | 221 void OnSwapBuffersComplete(); |
| 224 void OnSwapBuffersAborted(); | 222 void OnSwapBuffersAborted(); |
| (...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 786 | 784 |
| 787 ui::MenuSourceType context_menu_source_type_; | 785 ui::MenuSourceType context_menu_source_type_; |
| 788 gfx::Point touch_editing_context_menu_location_; | 786 gfx::Point touch_editing_context_menu_location_; |
| 789 | 787 |
| 790 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 788 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 791 }; | 789 }; |
| 792 | 790 |
| 793 } // namespace content | 791 } // namespace content |
| 794 | 792 |
| 795 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 793 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |