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

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

Issue 1722643003: Reland 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(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698