| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 Color margin; | 65 Color margin; |
| 66 Color eventTarget; | 66 Color eventTarget; |
| 67 Color shape; | 67 Color shape; |
| 68 Color shapeMargin; | 68 Color shapeMargin; |
| 69 | 69 |
| 70 bool showInfo; | 70 bool showInfo; |
| 71 bool showRulers; | 71 bool showRulers; |
| 72 bool showExtensionLines; | 72 bool showExtensionLines; |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 class InspectorOverlay { | 75 class InspectorOverlay final : public NoBaseWillBeGarbageCollectedFinalized<Insp
ectorOverlay> { |
| 76 WTF_MAKE_FAST_ALLOCATED; | 76 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; |
| 77 public: | 77 public: |
| 78 static PassOwnPtr<InspectorOverlay> create(Page* page, InspectorClient* clie
nt) | 78 static PassOwnPtrWillBeRawPtr<InspectorOverlay> create(Page* page, Inspector
Client* client) |
| 79 { | 79 { |
| 80 return adoptPtr(new InspectorOverlay(page, client)); | 80 return adoptPtrWillBeNoop(new InspectorOverlay(page, client)); |
| 81 } | 81 } |
| 82 | 82 |
| 83 ~InspectorOverlay(); | 83 ~InspectorOverlay(); |
| 84 void trace(Visitor*); |
| 84 | 85 |
| 85 void update(); | 86 void update(); |
| 86 void hide(); | 87 void hide(); |
| 87 void paint(GraphicsContext&); | 88 void paint(GraphicsContext&); |
| 88 void drawOutline(GraphicsContext*, const LayoutRect&, const Color&); | 89 void drawOutline(GraphicsContext*, const LayoutRect&, const Color&); |
| 89 bool handleGestureEvent(const PlatformGestureEvent&); | 90 bool handleGestureEvent(const PlatformGestureEvent&); |
| 90 bool handleMouseEvent(const PlatformMouseEvent&); | 91 bool handleMouseEvent(const PlatformMouseEvent&); |
| 91 bool handleTouchEvent(const PlatformTouchEvent&); | 92 bool handleTouchEvent(const PlatformTouchEvent&); |
| 92 bool handleKeyboardEvent(const PlatformKeyboardEvent&); | 93 bool handleKeyboardEvent(const PlatformKeyboardEvent&); |
| 93 | 94 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 121 void drawQuadHighlight(); | 122 void drawQuadHighlight(); |
| 122 void drawPausedInDebuggerMessage(); | 123 void drawPausedInDebuggerMessage(); |
| 123 void drawViewSize(); | 124 void drawViewSize(); |
| 124 | 125 |
| 125 Page* overlayPage(); | 126 Page* overlayPage(); |
| 126 void reset(const IntSize& viewportSize, int scrollX, int scrollY); | 127 void reset(const IntSize& viewportSize, int scrollX, int scrollY); |
| 127 void evaluateInOverlay(const String& method, const String& argument); | 128 void evaluateInOverlay(const String& method, const String& argument); |
| 128 void evaluateInOverlay(const String& method, PassRefPtr<JSONValue> argument)
; | 129 void evaluateInOverlay(const String& method, PassRefPtr<JSONValue> argument)
; |
| 129 void onTimer(Timer<InspectorOverlay>*); | 130 void onTimer(Timer<InspectorOverlay>*); |
| 130 | 131 |
| 131 Page* m_page; | 132 RawPtrWillBeMember<Page> m_page; |
| 132 InspectorClient* m_client; | 133 InspectorClient* m_client; |
| 133 String m_pausedInDebuggerMessage; | 134 String m_pausedInDebuggerMessage; |
| 134 bool m_inspectModeEnabled; | 135 bool m_inspectModeEnabled; |
| 135 RefPtrWillBePersistent<Node> m_highlightNode; | 136 RefPtrWillBeMember<Node> m_highlightNode; |
| 136 RefPtrWillBePersistent<Node> m_eventTargetNode; | 137 RefPtrWillBeMember<Node> m_eventTargetNode; |
| 137 HighlightConfig m_nodeHighlightConfig; | 138 HighlightConfig m_nodeHighlightConfig; |
| 138 OwnPtr<FloatQuad> m_highlightQuad; | 139 OwnPtr<FloatQuad> m_highlightQuad; |
| 139 OwnPtrWillBePersistent<Page> m_overlayPage; | 140 OwnPtrWillBeMember<Page> m_overlayPage; |
| 140 OwnPtr<EmptyChromeClient> m_overlayChromeClient; | 141 OwnPtr<EmptyChromeClient> m_overlayChromeClient; |
| 141 RefPtrWillBePersistent<InspectorOverlayHost> m_overlayHost; | 142 RefPtrWillBeMember<InspectorOverlayHost> m_overlayHost; |
| 142 HighlightConfig m_quadHighlightConfig; | 143 HighlightConfig m_quadHighlightConfig; |
| 143 bool m_drawViewSize; | 144 bool m_drawViewSize; |
| 144 bool m_drawViewSizeWithGrid; | 145 bool m_drawViewSizeWithGrid; |
| 145 bool m_omitTooltip; | 146 bool m_omitTooltip; |
| 146 Timer<InspectorOverlay> m_timer; | 147 Timer<InspectorOverlay> m_timer; |
| 147 int m_activeProfilerCount; | 148 int m_activeProfilerCount; |
| 148 bool m_updating; | 149 bool m_updating; |
| 149 }; | 150 }; |
| 150 | 151 |
| 151 } // namespace blink | 152 } // namespace blink |
| 152 | 153 |
| 153 | 154 |
| 154 #endif // InspectorOverlay_h | 155 #endif // InspectorOverlay_h |
| OLD | NEW |