InspectorFrontendHost.h [plain text]
#ifndef InspectorFrontendHost_h
#define InspectorFrontendHost_h
#include "ConsoleTypes.h"
#include "ContextMenu.h"
#include "ContextMenuProvider.h"
#include <wtf/RefCounted.h>
#include <wtf/Vector.h>
#include <wtf/text/WTFString.h>
namespace WebCore {
class ContextMenuItem;
class DOMFileSystem;
class Event;
class FrontendMenuProvider;
class InspectorFrontendClient;
class Page;
class InspectorFrontendHost : public RefCounted<InspectorFrontendHost> {
public:
static PassRefPtr<InspectorFrontendHost> create(InspectorFrontendClient* client, Page* frontendPage)
{
return adoptRef(new InspectorFrontendHost(client, frontendPage));
}
~InspectorFrontendHost();
void disconnectClient();
void loaded();
void requestSetDockSide(const String&);
void closeWindow();
void bringToFront();
void setZoomFactor(float);
void inspectedURLChanged(const String&);
void setAttachedWindowHeight(unsigned);
void setAttachedWindowWidth(unsigned);
void setToolbarHeight(unsigned);
void moveWindowBy(float x, float y) const;
void setInjectedScriptForOrigin(const String& origin, const String& script);
String localizedStringsURL();
void copyText(const String& text);
void openInNewTab(const String& url);
bool canSave();
void save(const String& url, const String& content, bool forceSaveAs);
void append(const String& url, const String& content);
void close(const String& url);
void showContextMenu(Event*, const Vector<ContextMenuItem>& items);
void sendMessageToBackend(const String& message);
String loadResourceSynchronously(const String& url);
bool supportsFileSystems();
void requestFileSystems();
void addFileSystem();
void removeFileSystem(const String& fileSystemPath);
#if ENABLE(FILE_SYSTEM)
PassRefPtr<DOMFileSystem> isolatedFileSystem(const String& fileSystemName, const String& rootURL);
#endif
bool isUnderTest();
bool canInspectWorkers();
bool canSaveAs();
private:
#if ENABLE(CONTEXT_MENUS)
friend class FrontendMenuProvider;
#endif
InspectorFrontendHost(InspectorFrontendClient*, Page* frontendPage);
InspectorFrontendClient* m_client;
Page* m_frontendPage;
#if ENABLE(CONTEXT_MENUS)
FrontendMenuProvider* m_menuProvider;
#endif
};
}
#endif // !defined(InspectorFrontendHost_h)