#ifndef InspectorFrontendHost_h
#define InspectorFrontendHost_h
-#include "bindings/v8/ScriptWrappable.h"
-#include "core/platform/ContextMenu.h"
+#include "bindings/core/v8/ScriptWrappable.h"
#include "wtf/RefCounted.h"
#include "wtf/Vector.h"
#include "wtf/text/WTFString.h"
-namespace WebCore {
+namespace blink {
class ContextMenuItem;
-class DOMFileSystem;
class Event;
class FrontendMenuProvider;
class InspectorFrontendClient;
class Page;
-class InspectorFrontendHost : public RefCounted<InspectorFrontendHost>, public ScriptWrappable {
+class InspectorFrontendHost : public RefCountedWillBeGarbageCollectedFinalized<InspectorFrontendHost>, public ScriptWrappable {
public:
- static PassRefPtr<InspectorFrontendHost> create(InspectorFrontendClient* client, Page* frontendPage)
+ static PassRefPtrWillBeRawPtr<InspectorFrontendHost> create(InspectorFrontendClient* client, Page* frontendPage)
{
- return adoptRef(new InspectorFrontendHost(client, frontendPage));
+ return adoptRefWillBeNoop(new InspectorFrontendHost(client, frontendPage));
}
~InspectorFrontendHost();
+ void trace(Visitor*);
void disconnectClient();
- void closeWindow();
void setZoomFactor(float);
- void inspectedURLChanged(const String&);
+ float zoomFactor();
void setInjectedScriptForOrigin(const String& origin, const String& script);
// Called from [Custom] implementations.
void showContextMenu(Event*, const Vector<ContextMenuItem>& items);
+ void showContextMenu(Page*, float x, float y, const Vector<ContextMenuItem>& items);
void sendMessageToBackend(const String& message);
void sendMessageToEmbedder(const String& message);
String getSelectionBackgroundColor();
String getSelectionForegroundColor();
- PassRefPtr<DOMFileSystem> isolatedFileSystem(const String& fileSystemName, const String& rootURL);
-
bool isUnderTest();
+ bool isHostedMode();
+
+ Page* frontendPage() { return m_frontendPage; }
private:
friend class FrontendMenuProvider;
InspectorFrontendHost(InspectorFrontendClient* client, Page* frontendPage);
InspectorFrontendClient* m_client;
- Page* m_frontendPage;
+ RawPtrWillBeMember<Page> m_frontendPage;
FrontendMenuProvider* m_menuProvider;
};
-} // namespace WebCore
+} // namespace blink
#endif // !defined(InspectorFrontendHost_h)