| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 | 48 |
| 49 class Color; | 49 class Color; |
| 50 class EmptyChromeClient; | 50 class EmptyChromeClient; |
| 51 class LocalFrame; | 51 class LocalFrame; |
| 52 class GraphicsContext; | 52 class GraphicsContext; |
| 53 class JSONValue; | 53 class JSONValue; |
| 54 class Node; | 54 class Node; |
| 55 class Page; | 55 class Page; |
| 56 class WebViewImpl; | 56 class WebViewImpl; |
| 57 | 57 |
| 58 class InspectorOverlayImpl final : public NoBaseWillBeGarbageCollectedFinalized<
InspectorOverlayImpl>, public InspectorOverlay, public WebPageOverlay, public In
spectorOverlayHost::Listener { | 58 class InspectorOverlayImpl final : public NoBaseWillBeGarbageCollectedFinalized<
InspectorOverlayImpl>, public InspectorOverlay, public WebPageOverlay, public In
spectorOverlayHost::Listener, public InspectorOverlayHost::CSSListener{ |
| 59 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(InspectorOverlayImpl); | 59 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(InspectorOverlayImpl); |
| 60 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(InspectorOverlayImpl); | 60 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(InspectorOverlayImpl); |
| 61 public: | 61 public: |
| 62 // FIXME: remove this once overlay works for non-main frame. | 62 // FIXME: remove this once overlay works for non-main frame. |
| 63 static PassOwnPtrWillBeRawPtr<InspectorOverlay> createEmpty(); | 63 static PassOwnPtrWillBeRawPtr<InspectorOverlay> createEmpty(); |
| 64 | 64 |
| 65 static PassOwnPtrWillBeRawPtr<InspectorOverlayImpl> create(WebViewImpl* webV
iewImpl) | 65 static PassOwnPtrWillBeRawPtr<InspectorOverlayImpl> create(WebViewImpl* webV
iewImpl) |
| 66 { | 66 { |
| 67 return adoptPtrWillBeNoop(new InspectorOverlayImpl(webViewImpl)); | 67 return adoptPtrWillBeNoop(new InspectorOverlayImpl(webViewImpl)); |
| 68 } | 68 } |
| 69 | 69 |
| 70 ~InspectorOverlayImpl() override; | 70 ~InspectorOverlayImpl() override; |
| 71 DECLARE_TRACE(); | 71 DECLARE_TRACE(); |
| 72 | 72 |
| 73 // InspectorOverlay implementation. | 73 // InspectorOverlay implementation. |
| 74 void update() override; | 74 void update() override; |
| 75 void setPausedInDebuggerMessage(const String*) override; | 75 void setPausedInDebuggerMessage(const String*) override; |
| 76 void setInspectModeEnabled(bool) override; | 76 void setInspectModeEnabled(bool) override; |
| 77 void hideHighlight() override; | 77 void hideHighlight() override; |
| 78 void highlightNode(Node*, Node* eventTarget, const InspectorHighlightConfig&
, bool omitTooltip) override; | 78 void highlightNode(Node*, Node* eventTarget, const InspectorHighlightConfig&
, bool omitTooltip) override; |
| 79 void highlightQuad(PassOwnPtr<FloatQuad>, const InspectorHighlightConfig&) o
verride; | 79 void highlightQuad(PassOwnPtr<FloatQuad>, const InspectorHighlightConfig&) o
verride; |
| 80 void showAndHideViewSize(bool showGrid) override; | 80 void showAndHideViewSize(bool showGrid) override; |
| 81 void setListener(InspectorOverlay::Listener* listener) override { m_listener
= listener; } | 81 void setListener(InspectorOverlay::Listener* listener) override { m_listener
= listener; } |
| 82 void setCSSListener(InspectorOverlay::CSSListener* listener) override { m_cs
sListener = listener; } |
| 83 |
| 82 void suspendUpdates() override; | 84 void suspendUpdates() override; |
| 83 void resumeUpdates() override; | 85 void resumeUpdates() override; |
| 84 void clear() override; | 86 void clear() override; |
| 85 | 87 |
| 86 bool handleInputEvent(const WebInputEvent&); | 88 bool handleInputEvent(const WebInputEvent&); |
| 87 void invalidate(); | 89 void invalidate(); |
| 88 private: | 90 private: |
| 89 explicit InspectorOverlayImpl(WebViewImpl*); | 91 explicit InspectorOverlayImpl(WebViewImpl*); |
| 90 | 92 |
| 91 // InspectorOverlayHost::Listener implementation. | 93 // InspectorOverlayHost::Listener implementation. |
| 92 void overlayResumed() override; | 94 void overlayResumed() override; |
| 93 void overlaySteppedOver() override; | 95 void overlaySteppedOver() override; |
| 94 | 96 |
| 97 void updateCSSProperty(long newValue) override; |
| 98 |
| 95 // WebPageOverlay implementation. | 99 // WebPageOverlay implementation. |
| 96 void paintPageOverlay(WebGraphicsContext*, const WebSize& webViewSize) overr
ide; | 100 void paintPageOverlay(WebGraphicsContext*, const WebSize& webViewSize) overr
ide; |
| 97 | 101 |
| 98 bool isEmpty(); | 102 bool isEmpty(); |
| 99 void drawNodeHighlight(); | 103 void drawNodeHighlight(); |
| 100 void drawQuadHighlight(); | 104 void drawQuadHighlight(); |
| 101 void drawPausedInDebuggerMessage(); | 105 void drawPausedInDebuggerMessage(); |
| 102 void drawViewSize(); | 106 void drawViewSize(); |
| 103 | 107 |
| 104 Page* overlayPage(); | 108 Page* overlayPage(); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 119 OwnPtr<EmptyChromeClient> m_overlayChromeClient; | 123 OwnPtr<EmptyChromeClient> m_overlayChromeClient; |
| 120 RefPtrWillBeMember<InspectorOverlayHost> m_overlayHost; | 124 RefPtrWillBeMember<InspectorOverlayHost> m_overlayHost; |
| 121 InspectorHighlightConfig m_quadHighlightConfig; | 125 InspectorHighlightConfig m_quadHighlightConfig; |
| 122 bool m_drawViewSize; | 126 bool m_drawViewSize; |
| 123 bool m_drawViewSizeWithGrid; | 127 bool m_drawViewSizeWithGrid; |
| 124 bool m_omitTooltip; | 128 bool m_omitTooltip; |
| 125 Timer<InspectorOverlayImpl> m_timer; | 129 Timer<InspectorOverlayImpl> m_timer; |
| 126 int m_suspendCount; | 130 int m_suspendCount; |
| 127 bool m_updating; | 131 bool m_updating; |
| 128 RawPtrWillBeMember<InspectorOverlay::Listener> m_listener; | 132 RawPtrWillBeMember<InspectorOverlay::Listener> m_listener; |
| 133 RawPtrWillBeMember<InspectorOverlay::CSSListener> m_cssListener; |
| 134 int m_initValue; |
| 129 }; | 135 }; |
| 130 | 136 |
| 131 } // namespace blink | 137 } // namespace blink |
| 132 | 138 |
| 133 | 139 |
| 134 #endif // InspectorOverlayImpl_h | 140 #endif // InspectorOverlayImpl_h |
| OLD | NEW |