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

Side by Side Diff: third_party/WebKit/Source/web/DevToolsEmulator.h

Issue 1641003003: [DevTools] Small cleanup after device mode v2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@device-mode-cleanup-split
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 DevToolsEmulator_h 5 #ifndef DevToolsEmulator_h
6 #define DevToolsEmulator_h 6 #define DevToolsEmulator_h
7 7
8 #include "platform/heap/Handle.h" 8 #include "platform/heap/Handle.h"
9 #include "public/platform/PointerProperties.h" 9 #include "public/platform/PointerProperties.h"
10 #include "public/web/WebDeviceEmulationParams.h" 10 #include "public/web/WebDeviceEmulationParams.h"
11 #include "wtf/Forward.h" 11 #include "wtf/Forward.h"
12 #include "wtf/OwnPtr.h" 12 #include "wtf/OwnPtr.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 class InspectorEmulationAgent; 16 class InspectorEmulationAgent;
17 class IntPoint; 17 class IntPoint;
18 class WebInputEvent; 18 class WebInputEvent;
19 class WebViewImpl; 19 class WebViewImpl;
20 20
21 class DevToolsEmulator final : public NoBaseWillBeGarbageCollectedFinalized<DevT oolsEmulator> { 21 class DevToolsEmulator final : public NoBaseWillBeGarbageCollectedFinalized<DevT oolsEmulator> {
22 public: 22 public:
23 ~DevToolsEmulator(); 23 ~DevToolsEmulator();
24 static PassOwnPtrWillBeRawPtr<DevToolsEmulator> create(WebViewImpl*); 24 static PassOwnPtrWillBeRawPtr<DevToolsEmulator> create(WebViewImpl*);
25 DECLARE_TRACE(); 25 DECLARE_TRACE();
26 26
27 void setEmulationAgent(InspectorEmulationAgent*);
28 void viewportChanged();
29
30 // Settings overrides. 27 // Settings overrides.
31 void setTextAutosizingEnabled(bool); 28 void setTextAutosizingEnabled(bool);
32 void setDeviceScaleAdjustment(float); 29 void setDeviceScaleAdjustment(float);
33 void setPreferCompositingToLCDTextEnabled(bool); 30 void setPreferCompositingToLCDTextEnabled(bool);
34 void setUseMobileViewportStyle(bool); 31 void setUseMobileViewportStyle(bool);
35 void setPluginsEnabled(bool); 32 void setPluginsEnabled(bool);
36 void setScriptEnabled(bool); 33 void setScriptEnabled(bool);
37 void setDoubleTapToZoomEnabled(bool); 34 void setDoubleTapToZoomEnabled(bool);
38 bool doubleTapToZoomEnabled() const; 35 bool doubleTapToZoomEnabled() const;
39 void setAvailablePointerTypes(int); 36 void setAvailablePointerTypes(int);
(...skipping 12 matching lines...) Expand all
52 bool handleInputEvent(const WebInputEvent&); 49 bool handleInputEvent(const WebInputEvent&);
53 void setScriptExecutionDisabled(bool); 50 void setScriptExecutionDisabled(bool);
54 51
55 private: 52 private:
56 explicit DevToolsEmulator(WebViewImpl*); 53 explicit DevToolsEmulator(WebViewImpl*);
57 54
58 void enableMobileEmulation(); 55 void enableMobileEmulation();
59 void disableMobileEmulation(); 56 void disableMobileEmulation();
60 57
61 WebViewImpl* m_webViewImpl; 58 WebViewImpl* m_webViewImpl;
62 RawPtrWillBeMember<InspectorEmulationAgent> m_emulationAgent;
63 59
64 bool m_deviceMetricsEnabled; 60 bool m_deviceMetricsEnabled;
65 bool m_emulateMobileEnabled; 61 bool m_emulateMobileEnabled;
66 WebDeviceEmulationParams m_emulationParams; 62 WebDeviceEmulationParams m_emulationParams;
67 63
68 bool m_isOverlayScrollbarsEnabled; 64 bool m_isOverlayScrollbarsEnabled;
69 float m_originalDefaultMinimumPageScaleFactor; 65 float m_originalDefaultMinimumPageScaleFactor;
70 float m_originalDefaultMaximumPageScaleFactor; 66 float m_originalDefaultMaximumPageScaleFactor;
71 bool m_embedderTextAutosizingEnabled; 67 bool m_embedderTextAutosizingEnabled;
72 float m_embedderDeviceScaleAdjustment; 68 float m_embedderDeviceScaleAdjustment;
(...skipping 15 matching lines...) Expand all
88 OwnPtr<IntPoint> m_lastPinchAnchorCss; 84 OwnPtr<IntPoint> m_lastPinchAnchorCss;
89 OwnPtr<IntPoint> m_lastPinchAnchorDip; 85 OwnPtr<IntPoint> m_lastPinchAnchorDip;
90 86
91 bool m_embedderScriptEnabled; 87 bool m_embedderScriptEnabled;
92 bool m_scriptExecutionDisabled; 88 bool m_scriptExecutionDisabled;
93 }; 89 };
94 90
95 } // namespace blink 91 } // namespace blink
96 92
97 #endif 93 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/protocol.json ('k') | third_party/WebKit/Source/web/DevToolsEmulator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698