| 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 "content/browser/devtools/protocol/devtools_protocol_dispatcher.h" | 8 #include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h" |
| 9 #include "content/browser/devtools/protocol/page_handler.h" | 9 #include "content/browser/devtools/protocol/page_handler.h" |
| 10 #include "third_party/WebKit/public/web/WebDeviceEmulationParams.h" | 10 #include "third_party/WebKit/public/web/WebDeviceEmulationParams.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 const std::string* configuration); | 42 const std::string* configuration); |
| 43 | 43 |
| 44 Response CanEmulate(bool* result); | 44 Response CanEmulate(bool* result); |
| 45 Response SetDeviceMetricsOverride(int width, | 45 Response SetDeviceMetricsOverride(int width, |
| 46 int height, | 46 int height, |
| 47 double device_scale_factor, | 47 double device_scale_factor, |
| 48 bool mobile, | 48 bool mobile, |
| 49 bool fit_window, | 49 bool fit_window, |
| 50 const double* optional_scale, | 50 const double* optional_scale, |
| 51 const double* optional_offset_x, | 51 const double* optional_offset_x, |
| 52 const double* optional_offset_y); | |
| 53 Response SetDeviceMetricsOverride(int width, | |
| 54 int height, | |
| 55 double device_scale_factor, | |
| 56 bool mobile, | |
| 57 bool fit_window, | |
| 58 const double* optional_scale, | |
| 59 const double* optional_offset_x, | |
| 60 const double* optional_offset_y, | 52 const double* optional_offset_y, |
| 61 const int* screen_widget, | 53 const int* screen_widget, |
| 62 const int* screen_height, | 54 const int* screen_height, |
| 63 const int* position_x, | 55 const int* position_x, |
| 64 const int* position_y); | 56 const int* position_y); |
| 65 Response ClearDeviceMetricsOverride(); | 57 Response ClearDeviceMetricsOverride(); |
| 66 | 58 |
| 67 private: | 59 private: |
| 68 WebContentsImpl* GetWebContents(); | 60 WebContentsImpl* GetWebContents(); |
| 69 void UpdateTouchEventEmulationState(); | 61 void UpdateTouchEventEmulationState(); |
| 70 void UpdateDeviceEmulationState(); | 62 void UpdateDeviceEmulationState(); |
| 71 | 63 |
| 72 bool touch_emulation_enabled_; | 64 bool touch_emulation_enabled_; |
| 73 std::string touch_emulation_configuration_; | 65 std::string touch_emulation_configuration_; |
| 74 | 66 |
| 75 bool device_emulation_enabled_; | 67 bool device_emulation_enabled_; |
| 76 blink::WebDeviceEmulationParams device_emulation_params_; | 68 blink::WebDeviceEmulationParams device_emulation_params_; |
| 77 | 69 |
| 78 page::PageHandler* page_handler_; | 70 page::PageHandler* page_handler_; |
| 79 RenderFrameHostImpl* host_; | 71 RenderFrameHostImpl* host_; |
| 80 | 72 |
| 81 DISALLOW_COPY_AND_ASSIGN(EmulationHandler); | 73 DISALLOW_COPY_AND_ASSIGN(EmulationHandler); |
| 82 }; | 74 }; |
| 83 | 75 |
| 84 } // namespace emulation | 76 } // namespace emulation |
| 85 } // namespace devtools | 77 } // namespace devtools |
| 86 } // namespace content | 78 } // namespace content |
| 87 | 79 |
| 88 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_EMULATION_HANDLER_H_ | 80 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_EMULATION_HANDLER_H_ |
| OLD | NEW |