Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / Source / web / InspectorEmulationAgent.h
blob2bceaf4abc3b3af5cccd7e7f341e116f06ce2aee
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
3 // found in the LICENSE file.
5 #ifndef InspectorEmulationAgent_h
6 #define InspectorEmulationAgent_h
8 #include "core/InspectorFrontend.h"
9 #include "core/inspector/InspectorBaseAgent.h"
11 namespace blink {
13 class WebViewImpl;
15 using ErrorString = String;
17 class InspectorEmulationAgent final : public InspectorBaseAgent<InspectorEmulationAgent, InspectorFrontend::Emulation>, public InspectorBackendDispatcher::EmulationCommandHandler {
18 WTF_MAKE_NONCOPYABLE(InspectorEmulationAgent);
19 public:
20 static PassOwnPtrWillBeRawPtr<InspectorEmulationAgent> create(WebViewImpl*);
21 ~InspectorEmulationAgent() override;
23 void viewportChanged();
25 // InspectorBackendDispatcher::EmulationCommandHandler implementation.
26 void resetScrollAndPageScaleFactor(ErrorString*) override;
27 void setPageScaleFactor(ErrorString*, double pageScaleFactor) override;
28 void setScriptExecutionDisabled(ErrorString*, bool) override;
29 void setTouchEmulationEnabled(ErrorString*, bool enabled, const String* configuration) override;
30 void setEmulatedMedia(ErrorString*, const String&) override;
32 // InspectorBaseAgent overrides.
33 void disable(ErrorString*) override;
34 void restore() override;
35 void discardAgent() override;
36 void didCommitLoadForLocalFrame(LocalFrame*) override;
38 DECLARE_VIRTUAL_TRACE();
40 private:
41 explicit InspectorEmulationAgent(WebViewImpl*);
43 WebViewImpl* m_webViewImpl;
47 } // namespace blink
50 #endif // !defined(InspectorEmulationAgent_h)