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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
72 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(InspectorOverlayImpl); | 72 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(InspectorOverlayImpl); |
73 public: | 73 public: |
74 static PassOwnPtrWillBeRawPtr<InspectorOverlayImpl> create(WebViewImpl* webV iewImpl) | 74 static PassOwnPtrWillBeRawPtr<InspectorOverlayImpl> create(WebViewImpl* webV iewImpl) |
75 { | 75 { |
76 return adoptPtrWillBeNoop(new InspectorOverlayImpl(webViewImpl)); | 76 return adoptPtrWillBeNoop(new InspectorOverlayImpl(webViewImpl)); |
77 } | 77 } |
78 | 78 |
79 ~InspectorOverlayImpl() override; | 79 ~InspectorOverlayImpl() override; |
80 DECLARE_TRACE(); | 80 DECLARE_TRACE(); |
81 | 81 |
82 void init(InspectorCSSAgent*, InspectorDebuggerAgent*); | 82 void init(InspectorCSSAgent*, InspectorDebuggerAgent*, InspectorDOMAgent*); |
83 | 83 |
84 void update(); | 84 void update(); |
85 void clear(); | 85 void clear(); |
86 bool handleInputEvent(const WebInputEvent&); | 86 bool handleInputEvent(const WebInputEvent&); |
87 void layout(); | 87 void layout(); |
88 PageOverlay* pageOverlay() { return m_pageOverlay.get(); }; | 88 PageOverlay* pageOverlay() { return m_pageOverlay.get(); }; |
89 | 89 |
90 private: | 90 private: |
91 explicit InspectorOverlayImpl(WebViewImpl*); | 91 explicit InspectorOverlayImpl(WebViewImpl*); |
92 class InspectorOverlayChromeClient; | 92 class InspectorOverlayChromeClient; |
93 class InspectorPageOverlayDelegate; | 93 class InspectorPageOverlayDelegate; |
94 | 94 |
95 // InspectorOverlayHost::Listener implementation. | 95 // InspectorOverlayHost::Listener implementation. |
96 void overlayResumed() override; | 96 void overlayResumed() override; |
97 void overlaySteppedOver() override; | 97 void overlaySteppedOver() override; |
98 void overlayStartedPropertyChange(const String&) override; | 98 void overlayStartedPropertyChange(const String&) override; |
99 void overlayPropertyChanged(float) override; | 99 void overlayPropertyChanged(float) override; |
100 void overlayEndedPropertyChange() override; | 100 void overlayEndedPropertyChange() override; |
101 | 101 |
102 // InspectorProfilerAgent::Client implementation. | 102 // InspectorProfilerAgent::Client implementation. |
103 void profilingStarted() override; | 103 void profilingStarted() override; |
104 void profilingStopped() override; | 104 void profilingStopped() override; |
105 | 105 |
106 // InspectorPageAgent::Client implementation. | 106 // InspectorPageAgent::Client implementation. |
107 void pageLayoutInvalidated(bool resized) override; | 107 void pageLayoutInvalidated(bool resized) override; |
108 void setShowViewportSizeOnResize(bool show, bool showGrid) override; | 108 void setShowViewportSizeOnResize(bool show, bool showGrid) override; |
109 void setPausedInDebuggerMessage(const String*) override; | 109 void setPausedInDebuggerMessage(const String*) override; |
110 | 110 |
111 // InspectorDOMAgent::Client implementation. | 111 // InspectorDOMAgent::Client implementation. |
112 void setInspectModeEnabled(bool) override; | |
113 void hideHighlight() override; | 112 void hideHighlight() override; |
114 void highlightNode(Node*, Node* eventTarget, const InspectorHighlightConfig& , bool omitTooltip) override; | 113 void highlightNode(Node*, Node* eventTarget, const InspectorHighlightConfig& , bool omitTooltip) override; |
115 void highlightQuad(PassOwnPtr<FloatQuad>, const InspectorHighlightConfig&) o verride; | 114 void highlightQuad(PassOwnPtr<FloatQuad>, const InspectorHighlightConfig&) o verride; |
115 void setSearchingForNode(InspectorDOMAgent::SearchMode, PassOwnPtr<Inspector HighlightConfig>) override; | |
dgozman
2015/09/01 00:53:29
setInspectMode(InspectorDOMAgent::InspectMode, ..)
sergeyv
2015/09/01 03:41:21
Done.
| |
116 | 116 |
117 bool isEmpty(); | 117 bool isEmpty(); |
118 void drawNodeHighlight(); | 118 void drawNodeHighlight(); |
119 void drawQuadHighlight(); | 119 void drawQuadHighlight(); |
120 void drawPausedInDebuggerMessage(); | 120 void drawPausedInDebuggerMessage(); |
121 void drawViewSize(); | 121 void drawViewSize(); |
122 | 122 |
123 Page* overlayPage(); | 123 Page* overlayPage(); |
124 LocalFrame* overlayMainFrame(); | 124 LocalFrame* overlayMainFrame(); |
125 void reset(const IntSize& viewportSize, const IntPoint& documentScrollOffset ); | 125 void reset(const IntSize& viewportSize, const IntPoint& documentScrollOffset ); |
126 void evaluateInOverlay(const String& method, const String& argument); | 126 void evaluateInOverlay(const String& method, const String& argument); |
127 void evaluateInOverlay(const String& method, PassRefPtr<JSONValue> argument) ; | 127 void evaluateInOverlay(const String& method, PassRefPtr<JSONValue> argument) ; |
128 void onTimer(Timer<InspectorOverlayImpl>*); | 128 void onTimer(Timer<InspectorOverlayImpl>*); |
129 void rebuildOverlayPage(); | 129 void rebuildOverlayPage(); |
130 void invalidate(); | 130 void invalidate(); |
131 | 131 |
132 bool handleMousePress(); | |
133 bool handleGestureEvent(LocalFrame*, const PlatformGestureEvent&); | |
134 bool handleTouchEvent(LocalFrame*, const PlatformTouchEvent&); | |
135 bool handleMouseMove(LocalFrame*, const PlatformMouseEvent&); | |
136 | |
132 WebViewImpl* m_webViewImpl; | 137 WebViewImpl* m_webViewImpl; |
133 String m_pausedInDebuggerMessage; | 138 String m_pausedInDebuggerMessage; |
134 bool m_inspectModeEnabled; | |
135 RefPtrWillBeMember<Node> m_highlightNode; | 139 RefPtrWillBeMember<Node> m_highlightNode; |
136 RefPtrWillBeMember<Node> m_eventTargetNode; | 140 RefPtrWillBeMember<Node> m_eventTargetNode; |
137 InspectorHighlightConfig m_nodeHighlightConfig; | 141 InspectorHighlightConfig m_nodeHighlightConfig; |
138 OwnPtr<FloatQuad> m_highlightQuad; | 142 OwnPtr<FloatQuad> m_highlightQuad; |
139 OwnPtrWillBeMember<Page> m_overlayPage; | 143 OwnPtrWillBeMember<Page> m_overlayPage; |
140 OwnPtrWillBeMember<InspectorOverlayChromeClient> m_overlayChromeClient; | 144 OwnPtrWillBeMember<InspectorOverlayChromeClient> m_overlayChromeClient; |
141 RefPtrWillBeMember<InspectorOverlayHost> m_overlayHost; | 145 RefPtrWillBeMember<InspectorOverlayHost> m_overlayHost; |
142 InspectorHighlightConfig m_quadHighlightConfig; | 146 InspectorHighlightConfig m_quadHighlightConfig; |
143 bool m_drawViewSize; | 147 bool m_drawViewSize; |
144 bool m_drawViewSizeWithGrid; | 148 bool m_drawViewSizeWithGrid; |
145 bool m_resizeTimerActive; | 149 bool m_resizeTimerActive; |
146 bool m_omitTooltip; | 150 bool m_omitTooltip; |
147 Timer<InspectorOverlayImpl> m_timer; | 151 Timer<InspectorOverlayImpl> m_timer; |
148 int m_suspendCount; | 152 int m_suspendCount; |
149 bool m_inLayout; | 153 bool m_inLayout; |
150 bool m_needsUpdate; | 154 bool m_needsUpdate; |
151 RawPtrWillBeMember<InspectorDebuggerAgent> m_debuggerAgent; | 155 RawPtrWillBeMember<InspectorDebuggerAgent> m_debuggerAgent; |
156 RawPtrWillBeMember<InspectorDOMAgent> m_domAgent; | |
152 OwnPtrWillBeMember<LayoutEditor> m_layoutEditor; | 157 OwnPtrWillBeMember<LayoutEditor> m_layoutEditor; |
153 OwnPtr<PageOverlay> m_pageOverlay; | 158 OwnPtr<PageOverlay> m_pageOverlay; |
159 RefPtrWillBeMember<Node> m_hoveredNodeForInspectMode; | |
160 InspectorDOMAgent::SearchMode m_searchingForNode; | |
dgozman
2015/09/01 00:53:29
m_inspectMode
sergeyv
2015/09/01 03:41:20
Done.
| |
161 OwnPtr<InspectorHighlightConfig> m_inspectModeHighlightConfig; | |
154 }; | 162 }; |
155 | 163 |
156 } // namespace blink | 164 } // namespace blink |
157 | 165 |
158 | 166 |
159 #endif // InspectorOverlayImpl_h | 167 #endif // InspectorOverlayImpl_h |
OLD | NEW |