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

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

Issue 1182663009: [DevTools] Disable plugins when emulating mobile. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/web/DevToolsEmulator.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "wtf/Forward.h" 8 #include "wtf/Forward.h"
9 #include "wtf/OwnPtr.h" 9 #include "wtf/OwnPtr.h"
10 10
(...skipping 12 matching lines...) Expand all
23 ~DevToolsEmulator(); 23 ~DevToolsEmulator();
24 24
25 void setEmulationAgent(InspectorEmulationAgent*); 25 void setEmulationAgent(InspectorEmulationAgent*);
26 void viewportChanged(); 26 void viewportChanged();
27 27
28 // Settings overrides. 28 // Settings overrides.
29 void setTextAutosizingEnabled(bool); 29 void setTextAutosizingEnabled(bool);
30 void setDeviceScaleAdjustment(float); 30 void setDeviceScaleAdjustment(float);
31 void setPreferCompositingToLCDTextEnabled(bool); 31 void setPreferCompositingToLCDTextEnabled(bool);
32 void setUseMobileViewportStyle(bool); 32 void setUseMobileViewportStyle(bool);
33 void setPluginsEnabled(bool);
33 void setScriptEnabled(bool); 34 void setScriptEnabled(bool);
34 void setDoubleTapToZoomEnabled(bool); 35 void setDoubleTapToZoomEnabled(bool);
35 bool doubleTapToZoomEnabled() const; 36 bool doubleTapToZoomEnabled() const;
36 37
37 // Emulation. 38 // Emulation.
38 void enableDeviceEmulation(const WebDeviceEmulationParams&); 39 void enableDeviceEmulation(const WebDeviceEmulationParams&);
39 void disableDeviceEmulation(); 40 void disableDeviceEmulation();
40 bool deviceEmulationEnabled() { return m_deviceMetricsEnabled; } 41 bool deviceEmulationEnabled() { return m_deviceMetricsEnabled; }
41 void setTouchEventEmulationEnabled(bool); 42 void setTouchEventEmulationEnabled(bool);
42 bool handleInputEvent(const WebInputEvent&); 43 bool handleInputEvent(const WebInputEvent&);
43 void setScriptExecutionDisabled(bool); 44 void setScriptExecutionDisabled(bool);
44 45
45 private: 46 private:
46 void enableMobileEmulation(); 47 void enableMobileEmulation();
47 void disableMobileEmulation(); 48 void disableMobileEmulation();
48 49
49 WebViewImpl* m_webViewImpl; 50 WebViewImpl* m_webViewImpl;
50 InspectorEmulationAgent* m_emulationAgent; 51 InspectorEmulationAgent* m_emulationAgent;
51 52
52 bool m_deviceMetricsEnabled; 53 bool m_deviceMetricsEnabled;
53 bool m_emulateMobileEnabled; 54 bool m_emulateMobileEnabled;
54 bool m_isOverlayScrollbarsEnabled; 55 bool m_isOverlayScrollbarsEnabled;
55 float m_originalDefaultMinimumPageScaleFactor; 56 float m_originalDefaultMinimumPageScaleFactor;
56 float m_originalDefaultMaximumPageScaleFactor; 57 float m_originalDefaultMaximumPageScaleFactor;
57 bool m_embedderTextAutosizingEnabled; 58 bool m_embedderTextAutosizingEnabled;
58 float m_embedderDeviceScaleAdjustment; 59 float m_embedderDeviceScaleAdjustment;
59 bool m_embedderPreferCompositingToLCDTextEnabled; 60 bool m_embedderPreferCompositingToLCDTextEnabled;
60 bool m_embedderUseMobileViewport; 61 bool m_embedderUseMobileViewport;
62 bool m_embedderPluginsEnabled;
61 63
62 bool m_touchEventEmulationEnabled; 64 bool m_touchEventEmulationEnabled;
63 bool m_doubleTapToZoomEnabled; 65 bool m_doubleTapToZoomEnabled;
64 bool m_originalTouchEnabled; 66 bool m_originalTouchEnabled;
65 bool m_originalDeviceSupportsMouse; 67 bool m_originalDeviceSupportsMouse;
66 bool m_originalDeviceSupportsTouch; 68 bool m_originalDeviceSupportsTouch;
67 int m_originalMaxTouchPoints; 69 int m_originalMaxTouchPoints;
68 OwnPtr<IntPoint> m_lastPinchAnchorCss; 70 OwnPtr<IntPoint> m_lastPinchAnchorCss;
69 OwnPtr<IntPoint> m_lastPinchAnchorDip; 71 OwnPtr<IntPoint> m_lastPinchAnchorDip;
70 72
71 bool m_embedderScriptEnabled; 73 bool m_embedderScriptEnabled;
72 bool m_scriptExecutionDisabled; 74 bool m_scriptExecutionDisabled;
73 }; 75 };
74 76
75 } // namespace blink 77 } // namespace blink
76 78
77 #endif 79 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/web/DevToolsEmulator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698