diff options
Diffstat (limited to 'Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.h')
-rw-r--r-- | Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.h | 74 |
1 files changed, 38 insertions, 36 deletions
diff --git a/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.h b/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.h index a086b7b95..96b9a2613 100644 --- a/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.h +++ b/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 Apple Inc. All rights reserved. + * Copyright (C) 2010, 2015 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,65 +23,67 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef WebInspectorClient_h -#define WebInspectorClient_h - -#if ENABLE(INSPECTOR) - -#include "PageOverlay.h" +#pragma once #include <WebCore/InspectorClient.h> -#include <WebCore/InspectorForwarding.h> +#include <WebCore/PageOverlay.h> +#include <wtf/HashSet.h> namespace WebCore { class GraphicsContext; +class GraphicsLayer; class IntRect; +class PageOverlay; } namespace WebKit { class WebPage; +class RepaintIndicatorLayerClient; -class WebInspectorClient : public WebCore::InspectorClient, public WebCore::InspectorFrontendChannel, private PageOverlay::Client { +class WebInspectorClient : public WebCore::InspectorClient, private WebCore::PageOverlay::Client { +friend class RepaintIndicatorLayerClient; public: - WebInspectorClient(WebPage* page) - : m_page(page) - , m_highlightOverlay(0) - { - } + WebInspectorClient(WebPage*); + virtual ~WebInspectorClient(); private: - virtual void inspectorDestroyed() override; + // WebCore::InspectorClient + void inspectedPageDestroyed() override; - virtual InspectorFrontendChannel* openInspectorFrontend(WebCore::InspectorController*) override; - virtual void closeInspectorFrontend() override; - virtual void bringFrontendToFront() override; - virtual void didResizeMainFrame(WebCore::Frame*) override; + Inspector::FrontendChannel* openLocalFrontend(WebCore::InspectorController*) override; + void bringFrontendToFront() override; + void didResizeMainFrame(WebCore::Frame*) override; -#if ENABLE(REMOTE_INSPECTOR) - virtual pid_t parentProcessIdentifier() const override; -#endif + void highlight() override; + void hideHighlight() override; + +#if PLATFORM(IOS) + void showInspectorIndication() override; + void hideInspectorIndication() override; - virtual void highlight() override; - virtual void hideHighlight() override; + void didSetSearchingForNode(bool) override; +#endif - virtual bool sendMessageToFrontend(const String&) override; + void elementSelectionChanged(bool) override; - virtual bool supportsFrameInstrumentation(); + bool overridesShowPaintRects() const override { return true; } + void showPaintRect(const WebCore::FloatRect&) override; // PageOverlay::Client - virtual void pageOverlayDestroyed(PageOverlay*) override; - virtual void willMoveToWebPage(PageOverlay*, WebPage*) override; - virtual void didMoveToWebPage(PageOverlay*, WebPage*) override; - virtual void drawRect(PageOverlay*, WebCore::GraphicsContext&, const WebCore::IntRect&) override; - virtual bool mouseEvent(PageOverlay*, const WebMouseEvent&) override; + void willMoveToPage(WebCore::PageOverlay&, WebCore::Page*) override; + void didMoveToPage(WebCore::PageOverlay&, WebCore::Page*) override; + void drawRect(WebCore::PageOverlay&, WebCore::GraphicsContext&, const WebCore::IntRect&) override; + bool mouseEvent(WebCore::PageOverlay&, const WebCore::PlatformMouseEvent&) override; + + void animationEndedForLayer(const WebCore::GraphicsLayer*); WebPage* m_page; - PageOverlay* m_highlightOverlay; + WebCore::PageOverlay* m_highlightOverlay; + + RefPtr<WebCore::PageOverlay> m_paintRectOverlay; + std::unique_ptr<RepaintIndicatorLayerClient> m_paintIndicatorLayerClient; + HashSet<WebCore::GraphicsLayer*> m_paintRectLayers; // Ideally this would be HashSet<std::unique_ptr<GraphicsLayer>> but that doesn't work yet. webkit.org/b/136166 }; } // namespace WebKit - -#endif // ENABLE(INSPECTOR) - -#endif // WebInspectorClient_h |