InspectorFrontendHost.h [plain text]
#ifndef InspectorFrontendHost_h
#define InspectorFrontendHost_h
#include "ConsoleTypes.h"
#include "ContextMenu.h"
#include "ContextMenuProvider.h"
#include "PlatformString.h"
#include <wtf/RefCounted.h>
#include <wtf/Vector.h>
namespace WebCore {
class ContextMenuItem;
class Event;
class FrontendMenuProvider;
class InspectorClient;
class InspectorFrontendClient;
class Node;
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 requestAttachWindow();
void requestDetachWindow();
void closeWindow();
void disconnectFromBackend();
void bringToFront();
void inspectedURLChanged(const String&);
void setAttachedWindowHeight(unsigned height);
void moveWindowBy(float x, float y) const;
void setExtensionAPI(const String& script);
String localizedStringsURL();
String hiddenPanels();
void copyText(const String& text);
void saveAs(const String& fileName, const String& content);
void saveSessionSetting(const String& key, const String& value);
String loadSessionSetting(const String& key);
void showContextMenu(Event*, const Vector<ContextMenuItem*>& items);
void sendMessageToBackend(const String& message);
private:
#if ENABLE(CONTEXT_MENUS)
friend class FrontendMenuProvider;
#endif
InspectorFrontendHost(InspectorFrontendClient* client, Page* frontendPage);
InspectorFrontendClient* m_client;
Page* m_frontendPage;
#if ENABLE(CONTEXT_MENUS)
FrontendMenuProvider* m_menuProvider;
#endif
};
}
#endif // !defined(InspectorFrontendHost_h)