| 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 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 Response SetGeolocationOverride(double* latitude, | 33 Response SetGeolocationOverride(double* latitude, |
| 34 double* longitude, | 34 double* longitude, |
| 35 double* accuracy); | 35 double* accuracy); |
| 36 Response ClearGeolocationOverride(); | 36 Response ClearGeolocationOverride(); |
| 37 | 37 |
| 38 Response SetTouchEmulationEnabled(bool enabled, | 38 Response SetTouchEmulationEnabled(bool enabled, |
| 39 const std::string* configuration); | 39 const std::string* configuration); |
| 40 | 40 |
| 41 Response CanEmulate(bool* result); | 41 Response CanEmulate(bool* result); |
| 42 Response SetDeviceMetricsOverride(int width, | 42 Response SetDeviceMetricsOverride( |
| 43 int height, | 43 int width, |
| 44 double device_scale_factor, | 44 int height, |
| 45 bool mobile, | 45 double device_scale_factor, |
| 46 bool fit_window, | 46 bool mobile, |
| 47 const double* optional_scale, | 47 bool fit_window, |
| 48 const double* optional_offset_x, | 48 const double* optional_scale, |
| 49 const double* optional_offset_y, | 49 const double* optional_offset_x, |
| 50 const int* screen_widget, | 50 const double* optional_offset_y, |
| 51 const int* screen_height, | 51 const int* screen_widget, |
| 52 const int* position_x, | 52 const int* screen_height, |
| 53 const int* position_y); | 53 const int* position_x, |
| 54 const int* position_y, |
| 55 const scoped_ptr<base::DictionaryValue>& screen_orientation); |
| 54 Response ClearDeviceMetricsOverride(); | 56 Response ClearDeviceMetricsOverride(); |
| 55 | 57 |
| 56 private: | 58 private: |
| 57 WebContentsImpl* GetWebContents(); | 59 WebContentsImpl* GetWebContents(); |
| 58 void UpdateTouchEventEmulationState(); | 60 void UpdateTouchEventEmulationState(); |
| 59 void UpdateDeviceEmulationState(); | 61 void UpdateDeviceEmulationState(); |
| 60 | 62 |
| 61 bool touch_emulation_enabled_; | 63 bool touch_emulation_enabled_; |
| 62 std::string touch_emulation_configuration_; | 64 std::string touch_emulation_configuration_; |
| 63 | 65 |
| 64 bool device_emulation_enabled_; | 66 bool device_emulation_enabled_; |
| 65 blink::WebDeviceEmulationParams device_emulation_params_; | 67 blink::WebDeviceEmulationParams device_emulation_params_; |
| 66 | 68 |
| 67 RenderFrameHostImpl* host_; | 69 RenderFrameHostImpl* host_; |
| 68 | 70 |
| 69 DISALLOW_COPY_AND_ASSIGN(EmulationHandler); | 71 DISALLOW_COPY_AND_ASSIGN(EmulationHandler); |
| 70 }; | 72 }; |
| 71 | 73 |
| 72 } // namespace emulation | 74 } // namespace emulation |
| 73 } // namespace devtools | 75 } // namespace devtools |
| 74 } // namespace content | 76 } // namespace content |
| 75 | 77 |
| 76 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_EMULATION_HANDLER_H_ | 78 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_EMULATION_HANDLER_H_ |
| OLD | NEW |