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

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

Issue 1264483002: PageOverlays: Remove PageOverlayList (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 5 years, 4 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/InspectorOverlayImpl.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 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 20 matching lines...) Expand all
31 31
32 #include "core/InspectorTypeBuilder.h" 32 #include "core/InspectorTypeBuilder.h"
33 #include "core/inspector/InspectorOverlay.h" 33 #include "core/inspector/InspectorOverlay.h"
34 #include "core/inspector/InspectorOverlayHost.h" 34 #include "core/inspector/InspectorOverlayHost.h"
35 #include "platform/Timer.h" 35 #include "platform/Timer.h"
36 #include "platform/geometry/FloatQuad.h" 36 #include "platform/geometry/FloatQuad.h"
37 #include "platform/geometry/LayoutRect.h" 37 #include "platform/geometry/LayoutRect.h"
38 #include "platform/graphics/Color.h" 38 #include "platform/graphics/Color.h"
39 #include "platform/heap/Handle.h" 39 #include "platform/heap/Handle.h"
40 #include "public/web/WebInputEvent.h" 40 #include "public/web/WebInputEvent.h"
41 #include "public/web/WebPageOverlay.h"
42 #include "wtf/OwnPtr.h" 41 #include "wtf/OwnPtr.h"
43 #include "wtf/PassOwnPtr.h" 42 #include "wtf/PassOwnPtr.h"
44 #include "wtf/RefPtr.h" 43 #include "wtf/RefPtr.h"
45 #include "wtf/text/WTFString.h" 44 #include "wtf/text/WTFString.h"
46 45
47 namespace blink { 46 namespace blink {
48 47
49 class Color; 48 class Color;
50 class EmptyChromeClient; 49 class EmptyChromeClient;
51 class LocalFrame; 50 class LocalFrame;
52 class GraphicsContext; 51 class GraphicsContext;
52 class GraphicsLayer;
53 class JSONValue; 53 class JSONValue;
54 class LayoutEditor;
54 class Node; 55 class Node;
55 class Page; 56 class Page;
57 class PageOverlay;
56 class WebViewImpl; 58 class WebViewImpl;
57 class LayoutEditor;
58 59
59 class InspectorOverlayImpl final : public NoBaseWillBeGarbageCollectedFinalized< InspectorOverlayImpl>, public InspectorOverlay, public WebPageOverlay, public In spectorOverlayHost::DebuggerListener { 60 class InspectorOverlayImpl final : public NoBaseWillBeGarbageCollectedFinalized< InspectorOverlayImpl>, public InspectorOverlay, public InspectorOverlayHost::Deb uggerListener {
60 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(InspectorOverlayImpl); 61 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(InspectorOverlayImpl);
61 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(InspectorOverlayImpl); 62 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(InspectorOverlayImpl);
62 public: 63 public:
63 // FIXME: remove this once overlay works for non-main frame. 64 // FIXME: remove this once overlay works for non-main frame.
64 static PassOwnPtrWillBeRawPtr<InspectorOverlay> createEmpty(); 65 static PassOwnPtrWillBeRawPtr<InspectorOverlay> createEmpty();
65 66
66 static PassOwnPtrWillBeRawPtr<InspectorOverlayImpl> create(WebViewImpl* webV iewImpl) 67 static PassOwnPtrWillBeRawPtr<InspectorOverlayImpl> create(WebViewImpl* webV iewImpl)
67 { 68 {
68 return adoptPtrWillBeNoop(new InspectorOverlayImpl(webViewImpl)); 69 return adoptPtrWillBeNoop(new InspectorOverlayImpl(webViewImpl));
69 } 70 }
(...skipping 10 matching lines...) Expand all
80 void highlightQuad(PassOwnPtr<FloatQuad>, const InspectorHighlightConfig&) o verride; 81 void highlightQuad(PassOwnPtr<FloatQuad>, const InspectorHighlightConfig&) o verride;
81 void showAndHideViewSize(bool showGrid) override; 82 void showAndHideViewSize(bool showGrid) override;
82 void setListener(InspectorOverlay::Listener* listener) override { m_listener = listener; } 83 void setListener(InspectorOverlay::Listener* listener) override { m_listener = listener; }
83 void suspendUpdates() override; 84 void suspendUpdates() override;
84 void resumeUpdates() override; 85 void resumeUpdates() override;
85 void clear() override; 86 void clear() override;
86 void setLayoutEditor(PassOwnPtrWillBeRawPtr<LayoutEditor>) override; 87 void setLayoutEditor(PassOwnPtrWillBeRawPtr<LayoutEditor>) override;
87 88
88 bool handleInputEvent(const WebInputEvent&); 89 bool handleInputEvent(const WebInputEvent&);
89 void layout(); 90 void layout();
91 PageOverlay* pageOverlay() { return m_pageOverlay.get(); };
90 private: 92 private:
91 explicit InspectorOverlayImpl(WebViewImpl*); 93 explicit InspectorOverlayImpl(WebViewImpl*);
92 class InspectorOverlayChromeClient; 94 class InspectorOverlayChromeClient;
95 class InspectorPageOverlayDelegate;
93 // InspectorOverlayHost::DebuggerListener implementation. 96 // InspectorOverlayHost::DebuggerListener implementation.
94 void overlayResumed() override; 97 void overlayResumed() override;
95 void overlaySteppedOver() override; 98 void overlaySteppedOver() override;
96 99
97 // WebPageOverlay implementation.
98 void paintPageOverlay(WebGraphicsContext*, const WebSize& webViewSize) overr ide;
99
100 bool isEmpty(); 100 bool isEmpty();
101 void drawNodeHighlight(); 101 void drawNodeHighlight();
102 void drawQuadHighlight(); 102 void drawQuadHighlight();
103 void drawPausedInDebuggerMessage(); 103 void drawPausedInDebuggerMessage();
104 void drawViewSize(); 104 void drawViewSize();
105 105
106 Page* overlayPage(); 106 Page* overlayPage();
107 LocalFrame* overlayMainFrame(); 107 LocalFrame* overlayMainFrame();
108 void reset(const IntSize& viewportSize, const IntPoint& documentScrollOffset ); 108 void reset(const IntSize& viewportSize, const IntPoint& documentScrollOffset );
109 void evaluateInOverlay(const String& method, const String& argument); 109 void evaluateInOverlay(const String& method, const String& argument);
(...skipping 15 matching lines...) Expand all
125 InspectorHighlightConfig m_quadHighlightConfig; 125 InspectorHighlightConfig m_quadHighlightConfig;
126 bool m_drawViewSize; 126 bool m_drawViewSize;
127 bool m_drawViewSizeWithGrid; 127 bool m_drawViewSizeWithGrid;
128 bool m_omitTooltip; 128 bool m_omitTooltip;
129 Timer<InspectorOverlayImpl> m_timer; 129 Timer<InspectorOverlayImpl> m_timer;
130 int m_suspendCount; 130 int m_suspendCount;
131 bool m_inLayout; 131 bool m_inLayout;
132 bool m_needsUpdate; 132 bool m_needsUpdate;
133 RawPtrWillBeMember<InspectorOverlay::Listener> m_listener; 133 RawPtrWillBeMember<InspectorOverlay::Listener> m_listener;
134 OwnPtrWillBeMember<LayoutEditor> m_layoutEditor; 134 OwnPtrWillBeMember<LayoutEditor> m_layoutEditor;
135 OwnPtr<PageOverlay> m_pageOverlay;
135 }; 136 };
136 137
137 } // namespace blink 138 } // namespace blink
138 139
139 140
140 #endif // InspectorOverlayImpl_h 141 #endif // InspectorOverlayImpl_h
OLDNEW
« no previous file with comments | « no previous file | Source/web/InspectorOverlayImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698