| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 class FrameView; | 47 class FrameView; |
| 48 class GraphicsContext; | 48 class GraphicsContext; |
| 49 class InspectorClient; | 49 class InspectorClient; |
| 50 class InspectorController; | 50 class InspectorController; |
| 51 class Node; | 51 class Node; |
| 52 class PlatformKeyboardEvent; | 52 class PlatformKeyboardEvent; |
| 53 } | 53 } |
| 54 | 54 |
| 55 namespace WebKit { | 55 namespace WebKit { |
| 56 | 56 |
| 57 class DeviceMetricsSupport; | |
| 58 class WebDevToolsAgentClient; | 57 class WebDevToolsAgentClient; |
| 59 class WebFrame; | 58 class WebFrame; |
| 60 class WebFrameImpl; | 59 class WebFrameImpl; |
| 61 class WebString; | 60 class WebString; |
| 62 class WebURLRequest; | 61 class WebURLRequest; |
| 63 class WebURLResponse; | 62 class WebURLResponse; |
| 64 class WebViewImpl; | 63 class WebViewImpl; |
| 65 struct WebMemoryUsageInfo; | 64 struct WebMemoryUsageInfo; |
| 66 struct WebURLError; | 65 struct WebURLError; |
| 67 struct WebDevToolsMessageData; | 66 struct WebDevToolsMessageData; |
| 68 | 67 |
| 69 class WebDevToolsAgentImpl : public WebDevToolsAgentPrivate, | 68 class WebDevToolsAgentImpl : public WebDevToolsAgentPrivate, |
| 70 public WebCore::InspectorClient, | 69 public WebCore::InspectorClient, |
| 71 public WebCore::InspectorFrontendChannel, | 70 public WebCore::InspectorFrontendChannel, |
| 72 public WebPageOverlay, | 71 public WebPageOverlay, |
| 73 private WebThread::TaskObserver { | 72 private WebThread::TaskObserver { |
| 74 public: | 73 public: |
| 75 WebDevToolsAgentImpl(WebViewImpl* webViewImpl, WebDevToolsAgentClient* clien
t); | 74 WebDevToolsAgentImpl(WebViewImpl* webViewImpl, WebDevToolsAgentClient* clien
t); |
| 76 virtual ~WebDevToolsAgentImpl(); | 75 virtual ~WebDevToolsAgentImpl(); |
| 77 | 76 |
| 78 // WebDevToolsAgentPrivate implementation. | 77 // WebDevToolsAgentPrivate implementation. |
| 79 virtual void didCreateScriptContext(WebFrameImpl*, int worldId); | 78 virtual void didCreateScriptContext(WebFrameImpl*, int worldId); |
| 80 virtual void mainFrameViewCreated(WebFrameImpl*); | |
| 81 virtual bool metricsOverridden(); | |
| 82 virtual void webViewResized(const WebSize&); | 79 virtual void webViewResized(const WebSize&); |
| 83 virtual bool handleInputEvent(WebCore::Page*, const WebInputEvent&); | 80 virtual bool handleInputEvent(WebCore::Page*, const WebInputEvent&); |
| 84 | 81 |
| 85 // WebDevToolsAgent implementation. | 82 // WebDevToolsAgent implementation. |
| 86 virtual void attach(); | 83 virtual void attach(); |
| 87 virtual void reattach(const WebString& savedState); | 84 virtual void reattach(const WebString& savedState); |
| 88 virtual void detach(); | 85 virtual void detach(); |
| 89 virtual void didNavigate(); | 86 virtual void didNavigate(); |
| 90 virtual void didBeginFrame(); | 87 virtual void didBeginFrame(); |
| 91 virtual void didCancelFrame(); | 88 virtual void didCancelFrame(); |
| 92 virtual void willComposite(); | 89 virtual void willComposite(); |
| 93 virtual void didComposite(); | 90 virtual void didComposite(); |
| 94 virtual void dispatchOnInspectorBackend(const WebString& message); | 91 virtual void dispatchOnInspectorBackend(const WebString& message); |
| 95 virtual void inspectElementAt(const WebPoint& point); | 92 virtual void inspectElementAt(const WebPoint& point); |
| 96 virtual void evaluateInWebInspector(long callId, const WebString& script); | 93 virtual void evaluateInWebInspector(long callId, const WebString& script); |
| 97 virtual void setProcessId(long); | 94 virtual void setProcessId(long); |
| 98 virtual void setLayerTreeId(int); | 95 virtual void setLayerTreeId(int); |
| 99 | 96 |
| 100 // InspectorClient implementation. | 97 // InspectorClient implementation. |
| 101 virtual void highlight(); | 98 virtual void highlight(); |
| 102 virtual void hideHighlight(); | 99 virtual void hideHighlight(); |
| 103 virtual void updateInspectorStateCookie(const WTF::String&); | 100 virtual void updateInspectorStateCookie(const WTF::String&); |
| 104 virtual bool sendMessageToFrontend(const WTF::String&); | 101 virtual bool sendMessageToFrontend(const WTF::String&); |
| 105 | 102 |
| 106 virtual void clearBrowserCache(); | 103 virtual void clearBrowserCache(); |
| 107 virtual void clearBrowserCookies(); | 104 virtual void clearBrowserCookies(); |
| 108 | 105 |
| 109 virtual void overrideDeviceMetrics(int width, int height, float fontScaleFac
tor, bool fitWindow); | 106 virtual void overrideDeviceMetrics(int width, int height, float fontScaleFac
tor, bool fitWindow); |
| 110 virtual void autoZoomPageToFitWidth(); | |
| 111 | 107 |
| 112 virtual void getAllocatedObjects(HashSet<const void*>&); | 108 virtual void getAllocatedObjects(HashSet<const void*>&); |
| 113 virtual void dumpUncountedAllocatedObjects(const HashMap<const void*, size_t
>&); | 109 virtual void dumpUncountedAllocatedObjects(const HashMap<const void*, size_t
>&); |
| 114 virtual void setTraceEventCallback(TraceEventCallback); | 110 virtual void setTraceEventCallback(TraceEventCallback); |
| 115 | 111 |
| 116 virtual void dispatchKeyEvent(const WebCore::PlatformKeyboardEvent&); | 112 virtual void dispatchKeyEvent(const WebCore::PlatformKeyboardEvent&); |
| 117 virtual void dispatchMouseEvent(const WebCore::PlatformMouseEvent&); | 113 virtual void dispatchMouseEvent(const WebCore::PlatformMouseEvent&); |
| 118 | 114 |
| 119 int hostId() { return m_hostId; } | 115 int hostId() { return m_hostId; } |
| 120 | 116 |
| 121 // WebPageOverlay | 117 // WebPageOverlay |
| 122 virtual void paintPageOverlay(WebCanvas*); | 118 virtual void paintPageOverlay(WebCanvas*); |
| 123 | 119 |
| 124 private: | 120 private: |
| 125 // WebThread::TaskObserver | 121 // WebThread::TaskObserver |
| 126 virtual void willProcessTask(); | 122 virtual void willProcessTask(); |
| 127 virtual void didProcessTask(); | 123 virtual void didProcessTask(); |
| 128 | 124 |
| 129 WebCore::InspectorController* inspectorController(); | 125 WebCore::InspectorController* inspectorController(); |
| 130 WebCore::Frame* mainFrame(); | 126 WebCore::Frame* mainFrame(); |
| 131 | 127 |
| 132 int m_hostId; | 128 int m_hostId; |
| 133 WebDevToolsAgentClient* m_client; | 129 WebDevToolsAgentClient* m_client; |
| 134 WebViewImpl* m_webViewImpl; | 130 WebViewImpl* m_webViewImpl; |
| 135 bool m_attached; | 131 bool m_attached; |
| 136 OwnPtr<DeviceMetricsSupport> m_metricsSupport; | 132 bool m_deviceMetricsEnabled; |
| 133 bool m_isCSSViewportEnabled; |
| 134 bool m_isOverlayScrollbarsEnabled; |
| 137 }; | 135 }; |
| 138 | 136 |
| 139 } // namespace WebKit | 137 } // namespace WebKit |
| 140 | 138 |
| 141 #endif | 139 #endif |
| OLD | NEW |