Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / inspector / InspectorController.h
index cb20342..db75896 100644 (file)
 #define InspectorController_h
 
 #include "core/inspector/InspectorBaseAgent.h"
+#include "platform/heap/Handle.h"
 #include "wtf/Forward.h"
 #include "wtf/HashMap.h"
 #include "wtf/Noncopyable.h"
-#include "wtf/Vector.h"
 #include "wtf/text/WTFString.h"
 
-namespace WebCore {
+namespace blink {
 
+class ContextMenuProvider;
 class DOMWrapperWorld;
 class LocalFrame;
 class GraphicsContext;
@@ -48,12 +49,14 @@ class InjectedScriptManager;
 class InspectorBackendDispatcher;
 class InspectorAgent;
 class InspectorClient;
+class InspectorCSSAgent;
 class InspectorDOMAgent;
 class InspectorFrontend;
 class InspectorFrontendChannel;
 class InspectorFrontendClient;
 class InspectorLayerTreeAgent;
 class InspectorPageAgent;
+class InspectorResourceAgent;
 class InspectorTimelineAgent;
 class InspectorTracingAgent;
 class InspectorOverlay;
@@ -68,34 +71,35 @@ class PlatformMouseEvent;
 class PlatformTouchEvent;
 class Node;
 
-class InspectorController {
+class InspectorController : public NoBaseWillBeGarbageCollectedFinalized<InspectorController> {
     WTF_MAKE_NONCOPYABLE(InspectorController);
-    WTF_MAKE_FAST_ALLOCATED;
+    WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED;
 public:
     ~InspectorController();
+    void trace(Visitor*);
 
-    static PassOwnPtr<InspectorController> create(Page*, InspectorClient*);
+    static PassOwnPtrWillBeRawPtr<InspectorController> create(Page*, InspectorClient*);
 
     // Settings overrides.
     void setTextAutosizingEnabled(bool);
     void setDeviceScaleAdjustment(float);
 
     void willBeDestroyed();
-    void registerModuleAgent(PassOwnPtr<InspectorAgent>);
+    void registerModuleAgent(PassOwnPtrWillBeRawPtr<InspectorAgent>);
 
-    void setInspectorFrontendClient(PassOwnPtr<InspectorFrontendClient>);
+    void setInspectorFrontendClient(PassOwnPtrWillBeRawPtr<InspectorFrontendClient>);
     void didClearDocumentOfWindowObject(LocalFrame*);
     void setInjectedScriptForOrigin(const String& origin, const String& source);
+    void showContextMenu(float x, float y, PassRefPtr<ContextMenuProvider>);
 
     void dispatchMessageFromFrontend(const String& message);
 
-    void connectFrontend(InspectorFrontendChannel*);
+    void connectFrontend(const String& hostId, InspectorFrontendChannel*);
     void disconnectFrontend();
     void reconnectFrontend();
-    void reuseFrontend(InspectorFrontendChannel*, const String& inspectorStateCookie);
+    void reuseFrontend(const String& hostId, InspectorFrontendChannel*, const String& inspectorStateCookie);
     void setProcessId(long);
     void setLayerTreeId(int);
-    void webViewResized(const IntSize&);
 
     void inspect(Node*);
     void drawHighlight(GraphicsContext&) const;
@@ -105,7 +109,7 @@ public:
     bool handleTouchEvent(LocalFrame*, const PlatformTouchEvent&);
     bool handleKeyboardEvent(LocalFrame*, const PlatformKeyboardEvent&);
 
-    void requestPageScaleFactor(float scale, const IntPoint& origin);
+    void deviceOrPageScaleFactorChanged();
     bool deviceEmulationEnabled();
 
     bool isUnderTest();
@@ -139,26 +143,28 @@ private:
 
     friend InstrumentingAgents* instrumentationForPage(Page*);
 
-    RefPtr<InstrumentingAgents> m_instrumentingAgents;
-    OwnPtr<InjectedScriptManager> m_injectedScriptManager;
-    OwnPtr<InspectorCompositeState> m_state;
+    RefPtrWillBeMember<InstrumentingAgents> m_instrumentingAgents;
+    OwnPtrWillBeMember<InjectedScriptManager> m_injectedScriptManager;
+    OwnPtrWillBeMember<InspectorCompositeState> m_state;
     OwnPtr<InspectorOverlay> m_overlay;
 
-    InspectorDOMAgent* m_domAgent;
-    InspectorPageAgent* m_pageAgent;
-    InspectorTimelineAgent* m_timelineAgent;
-    InspectorLayerTreeAgent* m_layerTreeAgent;
-    InspectorTracingAgent* m_tracingAgent;
+    RawPtrWillBeMember<InspectorDOMAgent> m_domAgent;
+    RawPtrWillBeMember<InspectorPageAgent> m_pageAgent;
+    RawPtrWillBeMember<InspectorTimelineAgent> m_timelineAgent;
+    RawPtrWillBeMember<InspectorCSSAgent> m_cssAgent;
+    RawPtrWillBeMember<InspectorResourceAgent> m_resourceAgent;
+    RawPtrWillBeMember<InspectorLayerTreeAgent> m_layerTreeAgent;
+    RawPtrWillBeMember<InspectorTracingAgent> m_tracingAgent;
 
     RefPtr<InspectorBackendDispatcher> m_inspectorBackendDispatcher;
-    OwnPtr<InspectorFrontendClient> m_inspectorFrontendClient;
+    OwnPtrWillBeMember<InspectorFrontendClient> m_inspectorFrontendClient;
     OwnPtr<InspectorFrontend> m_inspectorFrontend;
-    Page* m_page;
+    RawPtrWillBeMember<Page> m_page;
     InspectorClient* m_inspectorClient;
     InspectorAgentRegistry m_agents;
-    Vector<InspectorAgent*> m_moduleAgents;
     bool m_isUnderTest;
     bool m_deferredAgentsInitialized;
+    String m_hostId;
 };
 
 }