| 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 void clearSelection(bool) override; |
| 101 | 102 |
| 102 // InspectorProfilerAgent::Client implementation. | 103 // InspectorProfilerAgent::Client implementation. |
| 103 void profilingStarted() override; | 104 void profilingStarted() override; |
| 104 void profilingStopped() override; | 105 void profilingStopped() override; |
| 105 | 106 |
| 106 // InspectorPageAgent::Client implementation. | 107 // InspectorPageAgent::Client implementation. |
| 107 void pageLayoutInvalidated(bool resized) override; | 108 void pageLayoutInvalidated(bool resized) override; |
| 108 void setShowViewportSizeOnResize(bool show, bool showGrid) override; | 109 void setShowViewportSizeOnResize(bool show, bool showGrid) override; |
| 109 void setPausedInDebuggerMessage(const String*) override; | 110 void setPausedInDebuggerMessage(const String*) override; |
| 110 | 111 |
| 111 // InspectorDOMAgent::Client implementation. | 112 // InspectorDOMAgent::Client implementation. |
| 112 void setInspectModeEnabled(bool) override; | 113 void setInspectModeEnabled(bool) override; |
| 113 void hideHighlight() override; | 114 void hideHighlight() override; |
| 114 void highlightNode(Node*, Node* eventTarget, const InspectorHighlightConfig&
, bool omitTooltip) override; | 115 void highlightNode(Node*, Node* eventTarget, const InspectorHighlightConfig&
, bool omitTooltip) override; |
| 115 void highlightQuad(PassOwnPtr<FloatQuad>, const InspectorHighlightConfig&) o
verride; | 116 void highlightQuad(PassOwnPtr<FloatQuad>, const InspectorHighlightConfig&) o
verride; |
| 117 void showLayoutEditorForNode(Node*, const InspectorHighlightConfig&) overrid
e; |
| 116 | 118 |
| 117 bool isEmpty(); | 119 bool isEmpty(); |
| 118 void drawNodeHighlight(); | 120 void drawNodeHighlight(); |
| 119 void drawQuadHighlight(); | 121 void drawQuadHighlight(); |
| 120 void drawPausedInDebuggerMessage(); | 122 void drawPausedInDebuggerMessage(); |
| 121 void drawViewSize(); | 123 void drawViewSize(); |
| 122 | 124 |
| 123 Page* overlayPage(); | 125 Page* overlayPage(); |
| 124 LocalFrame* overlayMainFrame(); | 126 LocalFrame* overlayMainFrame(); |
| 125 void reset(const IntSize& viewportSize, const IntPoint& documentScrollOffset
); | 127 void reset(const IntSize& viewportSize, const IntPoint& documentScrollOffset
); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 150 bool m_needsUpdate; | 152 bool m_needsUpdate; |
| 151 RawPtrWillBeMember<InspectorDebuggerAgent> m_debuggerAgent; | 153 RawPtrWillBeMember<InspectorDebuggerAgent> m_debuggerAgent; |
| 152 OwnPtrWillBeMember<LayoutEditor> m_layoutEditor; | 154 OwnPtrWillBeMember<LayoutEditor> m_layoutEditor; |
| 153 OwnPtr<PageOverlay> m_pageOverlay; | 155 OwnPtr<PageOverlay> m_pageOverlay; |
| 154 }; | 156 }; |
| 155 | 157 |
| 156 } // namespace blink | 158 } // namespace blink |
| 157 | 159 |
| 158 | 160 |
| 159 #endif // InspectorOverlayImpl_h | 161 #endif // InspectorOverlayImpl_h |
| OLD | NEW |