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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Response ClearDeviceMetricsOverride(); | 56 Response ClearDeviceMetricsOverride(); |
57 | 57 |
| 58 Response GetFrameSize(int* width, int* height); |
| 59 Response SetFrameSize(int width, int height); |
| 60 |
58 private: | 61 private: |
59 WebContentsImpl* GetWebContents(); | 62 WebContentsImpl* GetWebContents(); |
60 void UpdateTouchEventEmulationState(); | 63 void UpdateTouchEventEmulationState(); |
61 void UpdateDeviceEmulationState(); | 64 void UpdateDeviceEmulationState(); |
62 | 65 |
63 bool touch_emulation_enabled_; | 66 bool touch_emulation_enabled_; |
64 std::string touch_emulation_configuration_; | 67 std::string touch_emulation_configuration_; |
65 | 68 |
66 bool device_emulation_enabled_; | 69 bool device_emulation_enabled_; |
67 blink::WebDeviceEmulationParams device_emulation_params_; | 70 blink::WebDeviceEmulationParams device_emulation_params_; |
68 | 71 |
69 RenderFrameHostImpl* host_; | 72 RenderFrameHostImpl* host_; |
70 | 73 |
71 DISALLOW_COPY_AND_ASSIGN(EmulationHandler); | 74 DISALLOW_COPY_AND_ASSIGN(EmulationHandler); |
72 }; | 75 }; |
73 | 76 |
74 } // namespace emulation | 77 } // namespace emulation |
75 } // namespace devtools | 78 } // namespace devtools |
76 } // namespace content | 79 } // namespace content |
77 | 80 |
78 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_EMULATION_HANDLER_H_ | 81 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_EMULATION_HANDLER_H_ |
OLD | NEW |