OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_BROWSER_DEVTOOLS_PROTOCOL_EMULATION_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_EMULATION_HANDLER_H_ |
6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_EMULATION_HANDLER_H_ | 6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_EMULATION_HANDLER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h" | 9 #include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h" |
10 #include "third_party/WebKit/public/web/WebDeviceEmulationParams.h" | 10 #include "third_party/WebKit/public/web/WebDeviceEmulationParams.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 double device_scale_factor, | 45 double device_scale_factor, |
46 bool mobile, | 46 bool mobile, |
47 bool fit_window, | 47 bool fit_window, |
48 const double* optional_scale, | 48 const double* optional_scale, |
49 const double* optional_offset_x, | 49 const double* optional_offset_x, |
50 const double* optional_offset_y, | 50 const double* optional_offset_y, |
51 const int* screen_widget, | 51 const int* screen_widget, |
52 const int* screen_height, | 52 const int* screen_height, |
53 const int* position_x, | 53 const int* position_x, |
54 const int* position_y, | 54 const int* position_y, |
55 const std::unique_ptr<base::DictionaryValue>& screen_orientation); | 55 const std::unique_ptr<base::DictionaryValue>& screen_orientation, |
| 56 const int* scroll_position_x, |
| 57 const int* scroll_position_y, |
| 58 const int* visual_viewport_width, |
| 59 const int* visual_viewport_height, |
| 60 const double* visual_viewport_position_x, |
| 61 const double* visual_viewport_position_y, |
| 62 const double* visual_viewport_scale, |
| 63 const bool* resize_window); |
56 Response ClearDeviceMetricsOverride(); | 64 Response ClearDeviceMetricsOverride(); |
57 | 65 |
58 private: | 66 private: |
59 WebContentsImpl* GetWebContents(); | 67 WebContentsImpl* GetWebContents(); |
60 void UpdateTouchEventEmulationState(); | 68 void UpdateTouchEventEmulationState(); |
61 void UpdateDeviceEmulationState(); | 69 void UpdateDeviceEmulationState(); |
62 | 70 |
63 bool touch_emulation_enabled_; | 71 bool touch_emulation_enabled_; |
64 std::string touch_emulation_configuration_; | 72 std::string touch_emulation_configuration_; |
65 | 73 |
66 bool device_emulation_enabled_; | 74 bool device_emulation_enabled_; |
67 blink::WebDeviceEmulationParams device_emulation_params_; | 75 blink::WebDeviceEmulationParams device_emulation_params_; |
68 | 76 |
69 RenderFrameHostImpl* host_; | 77 RenderFrameHostImpl* host_; |
70 | 78 |
71 DISALLOW_COPY_AND_ASSIGN(EmulationHandler); | 79 DISALLOW_COPY_AND_ASSIGN(EmulationHandler); |
72 }; | 80 }; |
73 | 81 |
74 } // namespace emulation | 82 } // namespace emulation |
75 } // namespace devtools | 83 } // namespace devtools |
76 } // namespace content | 84 } // namespace content |
77 | 85 |
78 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_EMULATION_HANDLER_H_ | 86 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_EMULATION_HANDLER_H_ |
OLD | NEW |