Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Side by Side Diff: content/browser/devtools/protocol/emulation_handler.h

Issue 1727083002: Revert of [DevTools] Move screen orientation override to RenderWidgetScreenMetricsEmulator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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( 42 Response SetDeviceMetricsOverride(int width,
43 int width, 43 int height,
44 int height, 44 double device_scale_factor,
45 double device_scale_factor, 45 bool mobile,
46 bool mobile, 46 bool fit_window,
47 bool fit_window, 47 const double* optional_scale,
48 const double* optional_scale, 48 const double* optional_offset_x,
49 const double* optional_offset_x, 49 const double* optional_offset_y,
50 const double* optional_offset_y, 50 const int* screen_widget,
51 const int* screen_widget, 51 const int* screen_height,
52 const int* screen_height, 52 const int* position_x,
53 const int* position_x, 53 const int* position_y);
54 const int* position_y,
55 const scoped_ptr<base::DictionaryValue>& screen_orientation);
56 Response ClearDeviceMetricsOverride(); 54 Response ClearDeviceMetricsOverride();
57 55
58 private: 56 private:
59 WebContentsImpl* GetWebContents(); 57 WebContentsImpl* GetWebContents();
60 void UpdateTouchEventEmulationState(); 58 void UpdateTouchEventEmulationState();
61 void UpdateDeviceEmulationState(); 59 void UpdateDeviceEmulationState();
62 60
63 bool touch_emulation_enabled_; 61 bool touch_emulation_enabled_;
64 std::string touch_emulation_configuration_; 62 std::string touch_emulation_configuration_;
65 63
66 bool device_emulation_enabled_; 64 bool device_emulation_enabled_;
67 blink::WebDeviceEmulationParams device_emulation_params_; 65 blink::WebDeviceEmulationParams device_emulation_params_;
68 66
69 RenderFrameHostImpl* host_; 67 RenderFrameHostImpl* host_;
70 68
71 DISALLOW_COPY_AND_ASSIGN(EmulationHandler); 69 DISALLOW_COPY_AND_ASSIGN(EmulationHandler);
72 }; 70 };
73 71
74 } // namespace emulation 72 } // namespace emulation
75 } // namespace devtools 73 } // namespace devtools
76 } // namespace content 74 } // namespace content
77 75
78 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_EMULATION_HANDLER_H_ 76 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_EMULATION_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698