Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / Source / web / InspectorRenderingAgent.h
blob6a649e8ded9be5381ff3512dac20104ebdcd0858
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 InspectorRenderingAgent_h
6 #define InspectorRenderingAgent_h
8 #include "core/InspectorFrontend.h"
9 #include "core/inspector/InspectorBaseAgent.h"
11 namespace blink {
13 class WebViewImpl;
15 using ErrorString = String;
17 class InspectorRenderingAgent final : public InspectorBaseAgent<InspectorRenderingAgent, InspectorFrontend::Rendering>, public InspectorBackendDispatcher::RenderingCommandHandler {
18 WTF_MAKE_NONCOPYABLE(InspectorRenderingAgent);
19 public:
20 static PassOwnPtrWillBeRawPtr<InspectorRenderingAgent> create(WebViewImpl*);
22 // InspectorBackendDispatcher::PageCommandHandler implementation.
23 void setShowPaintRects(ErrorString*, bool show) override;
24 void setShowDebugBorders(ErrorString*, bool show) override;
25 void setShowFPSCounter(ErrorString*, bool show) override;
26 void setShowScrollBottleneckRects(ErrorString*, bool show) override;
28 // InspectorBaseAgent overrides.
29 void disable(ErrorString*) override;
30 void restore() override;
32 DECLARE_VIRTUAL_TRACE();
34 private:
35 explicit InspectorRenderingAgent(WebViewImpl*);
36 bool compositingEnabled(ErrorString*);
38 WebViewImpl* m_webViewImpl;
42 } // namespace blink
45 #endif // !defined(InspectorRenderingAgent_h)