blob: 4de356cb1aa7a300b1a7adf1d58c32dc76b7f7b8 [file] [log] [blame]
arobendfc56662007-06-21 01:37:24 +00001/*
bburg@apple.com7a3efcb2015-09-18 17:16:24 +00002 * Copyright (C) 2007, 2015 Apple Inc. All rights reserved.
yurys@chromium.org19aebed2011-04-04 09:38:02 +00003 * Copyright (C) 2011 Google Inc. All rights reserved.
arobendfc56662007-06-21 01:37:24 +00004 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 *
mjs@apple.com92047332014-03-15 04:08:27 +000014 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
arobendfc56662007-06-21 01:37:24 +000015 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
mjs@apple.com92047332014-03-15 04:08:27 +000017 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
arobendfc56662007-06-21 01:37:24 +000018 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
21 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
commit-queue@webkit.orgf188ae92013-11-01 01:07:29 +000024 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
arobendfc56662007-06-21 01:37:24 +000025 */
26
commit-queue@webkit.org35dd3012016-08-15 20:55:16 +000027#pragma once
arobendfc56662007-06-21 01:37:24 +000028
barraclough@apple.comd218c2d2010-08-10 00:38:14 +000029#include <wtf/Forward.h>
timothy@apple.comf4540012008-10-24 18:49:39 +000030
bburg@apple.com3ced7762015-09-04 20:00:22 +000031namespace Inspector {
32class FrontendChannel;
33}
34
arobendfc56662007-06-21 01:37:24 +000035namespace WebCore {
36
simon.fraser@apple.com159ad602014-08-22 19:07:17 +000037class FloatRect;
joepeck@webkit.org9ef9acc2012-03-06 19:33:07 +000038class Frame;
simon.fraser@apple.com159ad602014-08-22 19:07:17 +000039class InspectorController;
arobendfc56662007-06-21 01:37:24 +000040class Page;
arobendfc56662007-06-21 01:37:24 +000041
commit-queue@webkit.orgf188ae92013-11-01 01:07:29 +000042class InspectorClient {
arobendfc56662007-06-21 01:37:24 +000043public:
pfeldman@chromium.org9db33972010-10-18 17:08:57 +000044 virtual ~InspectorClient() { }
arobendfc56662007-06-21 01:37:24 +000045
bburg@apple.comf92518b2015-09-12 17:44:40 +000046 virtual void inspectedPageDestroyed() = 0;
arobendfc56662007-06-21 01:37:24 +000047
bburg@apple.comf92518b2015-09-12 17:44:40 +000048 virtual Inspector::FrontendChannel* openLocalFrontend(InspectorController*) = 0;
pfeldman@chromium.org4911f052011-11-22 14:11:46 +000049 virtual void bringFrontendToFront() = 0;
joepeck@webkit.org9ef9acc2012-03-06 19:33:07 +000050 virtual void didResizeMainFrame(Frame*) { }
timothy@apple.com9ea832b2008-08-13 18:10:36 +000051
pfeldman@chromium.orgb0781ec2011-08-03 08:28:40 +000052 virtual void highlight() = 0;
arobendfc56662007-06-21 01:37:24 +000053 virtual void hideHighlight() = 0;
54
joepeck@webkit.orgd82c5dc2014-03-25 21:52:20 +000055 virtual void showInspectorIndication() { }
56 virtual void hideInspectorIndication() { }
joepeck@webkit.orgd2ecf372013-12-04 18:20:37 +000057
simon.fraser@apple.com159ad602014-08-22 19:07:17 +000058 virtual bool overridesShowPaintRects() const { return false; }
commit-queue@webkit.orgf075caf2012-11-27 18:52:30 +000059 virtual void setShowPaintRects(bool) { }
simon.fraser@apple.com159ad602014-08-22 19:07:17 +000060 virtual void showPaintRect(const FloatRect&) { }
commit-queue@webkit.org5d05e882013-10-28 22:08:51 +000061 virtual void didSetSearchingForNode(bool) { }
joepeck@webkit.org7b097f12016-04-12 19:35:22 +000062 virtual void elementSelectionChanged(bool) { }
commit-queue@webkit.org5d05e882013-10-28 22:08:51 +000063
bburg@apple.com73fb2492016-10-27 00:17:52 +000064 WEBCORE_EXPORT static void doDispatchMessageOnFrontendPage(Page* frontendPage, const String& message);
arobendfc56662007-06-21 01:37:24 +000065};
66
67} // namespace WebCore