| OLD | NEW |
| 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 16 matching lines...) Expand all Loading... |
| 27 */ | 27 */ |
| 28 | 28 |
| 29 #ifndef InspectorOverlay_h | 29 #ifndef InspectorOverlay_h |
| 30 #define InspectorOverlay_h | 30 #define InspectorOverlay_h |
| 31 | 31 |
| 32 #include "core/InspectorTypeBuilder.h" | 32 #include "core/InspectorTypeBuilder.h" |
| 33 #include "core/inspector/InspectorDOMAgent.h" | 33 #include "core/inspector/InspectorDOMAgent.h" |
| 34 #include "core/inspector/InspectorOverlayHost.h" | 34 #include "core/inspector/InspectorOverlayHost.h" |
| 35 #include "core/inspector/InspectorPageAgent.h" | 35 #include "core/inspector/InspectorPageAgent.h" |
| 36 #include "core/inspector/InspectorProfilerAgent.h" | 36 #include "core/inspector/InspectorProfilerAgent.h" |
| 37 #include "platform/Timer.h" | |
| 38 #include "platform/geometry/FloatQuad.h" | 37 #include "platform/geometry/FloatQuad.h" |
| 39 #include "platform/geometry/LayoutRect.h" | 38 #include "platform/geometry/LayoutRect.h" |
| 40 #include "platform/graphics/Color.h" | 39 #include "platform/graphics/Color.h" |
| 41 #include "platform/heap/Handle.h" | 40 #include "platform/heap/Handle.h" |
| 42 #include "public/web/WebInputEvent.h" | 41 #include "public/web/WebInputEvent.h" |
| 43 #include "wtf/OwnPtr.h" | 42 #include "wtf/OwnPtr.h" |
| 44 #include "wtf/PassOwnPtr.h" | 43 #include "wtf/PassOwnPtr.h" |
| 45 #include "wtf/RefPtr.h" | 44 #include "wtf/RefPtr.h" |
| 46 #include "wtf/text/WTFString.h" | 45 #include "wtf/text/WTFString.h" |
| 47 | 46 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 void overlayEndedPropertyChange() override; | 98 void overlayEndedPropertyChange() override; |
| 100 void overlayClearSelection(bool) override; | 99 void overlayClearSelection(bool) override; |
| 101 void overlayNextSelector() override; | 100 void overlayNextSelector() override; |
| 102 void overlayPreviousSelector() override; | 101 void overlayPreviousSelector() override; |
| 103 | 102 |
| 104 // InspectorProfilerAgent::Client implementation. | 103 // InspectorProfilerAgent::Client implementation. |
| 105 void profilingStarted() override; | 104 void profilingStarted() override; |
| 106 void profilingStopped() override; | 105 void profilingStopped() override; |
| 107 | 106 |
| 108 // InspectorPageAgent::Client implementation. | 107 // InspectorPageAgent::Client implementation. |
| 109 void pageLayoutInvalidated(bool resized) override; | 108 void pageLayoutInvalidated() override; |
| 110 void setShowViewportSizeOnResize(bool show, bool showGrid) override; | |
| 111 void setPausedInDebuggerMessage(const String*) override; | 109 void setPausedInDebuggerMessage(const String*) override; |
| 112 | 110 |
| 113 // InspectorDOMAgent::Client implementation. | 111 // InspectorDOMAgent::Client implementation. |
| 114 void hideHighlight() override; | 112 void hideHighlight() override; |
| 115 void highlightNode(Node*, const InspectorHighlightConfig&, bool omitTooltip)
override; | 113 void highlightNode(Node*, const InspectorHighlightConfig&, bool omitTooltip)
override; |
| 116 void highlightQuad(PassOwnPtr<FloatQuad>, const InspectorHighlightConfig&) o
verride; | 114 void highlightQuad(PassOwnPtr<FloatQuad>, const InspectorHighlightConfig&) o
verride; |
| 117 void setInspectMode(InspectorDOMAgent::SearchMode, PassOwnPtr<InspectorHighl
ightConfig>) override; | 115 void setInspectMode(InspectorDOMAgent::SearchMode, PassOwnPtr<InspectorHighl
ightConfig>) override; |
| 118 void setInspectedNode(Node*) override; | 116 void setInspectedNode(Node*) override; |
| 119 | 117 |
| 120 void highlightNode(Node*, Node* eventTarget, const InspectorHighlightConfig&
, bool omitTooltip); | 118 void highlightNode(Node*, Node* eventTarget, const InspectorHighlightConfig&
, bool omitTooltip); |
| 121 bool isEmpty(); | 119 bool isEmpty(); |
| 122 void drawNodeHighlight(); | 120 void drawNodeHighlight(); |
| 123 void drawQuadHighlight(); | 121 void drawQuadHighlight(); |
| 124 void drawPausedInDebuggerMessage(); | 122 void drawPausedInDebuggerMessage(); |
| 125 void drawViewSize(); | |
| 126 | 123 |
| 127 Page* overlayPage(); | 124 Page* overlayPage(); |
| 128 LocalFrame* overlayMainFrame(); | 125 LocalFrame* overlayMainFrame(); |
| 129 void reset(const IntSize& viewportSize, const IntPoint& documentScrollOffset
); | 126 void reset(const IntSize& viewportSize, const IntPoint& documentScrollOffset
); |
| 130 void evaluateInOverlay(const String& method, const String& argument); | 127 void evaluateInOverlay(const String& method, const String& argument); |
| 131 void evaluateInOverlay(const String& method, PassRefPtr<JSONValue> argument)
; | 128 void evaluateInOverlay(const String& method, PassRefPtr<JSONValue> argument)
; |
| 132 void onTimer(Timer<InspectorOverlay>*); | |
| 133 void rebuildOverlayPage(); | 129 void rebuildOverlayPage(); |
| 134 void invalidate(); | 130 void invalidate(); |
| 135 void scheduleUpdate(); | 131 void scheduleUpdate(); |
| 136 | 132 |
| 137 bool handleMousePress(); | 133 bool handleMousePress(); |
| 138 bool handleGestureEvent(const PlatformGestureEvent&); | 134 bool handleGestureEvent(const PlatformGestureEvent&); |
| 139 bool handleTouchEvent(const PlatformTouchEvent&); | 135 bool handleTouchEvent(const PlatformTouchEvent&); |
| 140 bool handleMouseMove(const PlatformMouseEvent&); | 136 bool handleMouseMove(const PlatformMouseEvent&); |
| 141 bool shouldSearchForNode(); | 137 bool shouldSearchForNode(); |
| 142 void inspect(Node*); | 138 void inspect(Node*); |
| 143 void initializeLayoutEditorIfNeeded(Node*); | 139 void initializeLayoutEditorIfNeeded(Node*); |
| 144 | 140 |
| 145 WebViewImpl* m_webViewImpl; | 141 WebViewImpl* m_webViewImpl; |
| 146 String m_pausedInDebuggerMessage; | 142 String m_pausedInDebuggerMessage; |
| 147 RefPtrWillBeMember<Node> m_highlightNode; | 143 RefPtrWillBeMember<Node> m_highlightNode; |
| 148 RefPtrWillBeMember<Node> m_eventTargetNode; | 144 RefPtrWillBeMember<Node> m_eventTargetNode; |
| 149 InspectorHighlightConfig m_nodeHighlightConfig; | 145 InspectorHighlightConfig m_nodeHighlightConfig; |
| 150 OwnPtr<FloatQuad> m_highlightQuad; | 146 OwnPtr<FloatQuad> m_highlightQuad; |
| 151 OwnPtrWillBeMember<Page> m_overlayPage; | 147 OwnPtrWillBeMember<Page> m_overlayPage; |
| 152 OwnPtrWillBeMember<InspectorOverlayChromeClient> m_overlayChromeClient; | 148 OwnPtrWillBeMember<InspectorOverlayChromeClient> m_overlayChromeClient; |
| 153 RefPtrWillBeMember<InspectorOverlayHost> m_overlayHost; | 149 RefPtrWillBeMember<InspectorOverlayHost> m_overlayHost; |
| 154 InspectorHighlightConfig m_quadHighlightConfig; | 150 InspectorHighlightConfig m_quadHighlightConfig; |
| 155 bool m_drawViewSize; | |
| 156 bool m_drawViewSizeWithGrid; | |
| 157 bool m_resizeTimerActive; | |
| 158 bool m_omitTooltip; | 151 bool m_omitTooltip; |
| 159 Timer<InspectorOverlay> m_timer; | |
| 160 int m_suspendCount; | 152 int m_suspendCount; |
| 161 bool m_inLayout; | 153 bool m_inLayout; |
| 162 bool m_needsUpdate; | 154 bool m_needsUpdate; |
| 163 RawPtrWillBeMember<InspectorDebuggerAgent> m_debuggerAgent; | 155 RawPtrWillBeMember<InspectorDebuggerAgent> m_debuggerAgent; |
| 164 RawPtrWillBeMember<InspectorDOMAgent> m_domAgent; | 156 RawPtrWillBeMember<InspectorDOMAgent> m_domAgent; |
| 165 RawPtrWillBeMember<InspectorCSSAgent> m_cssAgent; | 157 RawPtrWillBeMember<InspectorCSSAgent> m_cssAgent; |
| 166 OwnPtrWillBeMember<LayoutEditor> m_layoutEditor; | 158 OwnPtrWillBeMember<LayoutEditor> m_layoutEditor; |
| 167 OwnPtr<PageOverlay> m_pageOverlay; | 159 OwnPtr<PageOverlay> m_pageOverlay; |
| 168 RefPtrWillBeMember<Node> m_hoveredNodeForInspectMode; | 160 RefPtrWillBeMember<Node> m_hoveredNodeForInspectMode; |
| 169 InspectorDOMAgent::SearchMode m_inspectMode; | 161 InspectorDOMAgent::SearchMode m_inspectMode; |
| 170 OwnPtr<InspectorHighlightConfig> m_inspectModeHighlightConfig; | 162 OwnPtr<InspectorHighlightConfig> m_inspectModeHighlightConfig; |
| 171 }; | 163 }; |
| 172 | 164 |
| 173 } // namespace blink | 165 } // namespace blink |
| 174 | 166 |
| 175 | 167 |
| 176 #endif // InspectorOverlay_h | 168 #endif // InspectorOverlay_h |
| OLD | NEW |