blob: c29741e588141da17f30968b5196865980bca07e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef TEST_SHELL_DEVTOOLS_AGENT_H_
#define TEST_SHELL_DEVTOOLS_AGENT_H_
#include "base/task.h"
#include "third_party/WebKit/WebKit/chromium/public/WebDevToolsAgentClient.h"
namespace WebKit {
class WebDevToolsAgent;
class WebView;
struct WebDevToolsMessageData;
} // namespace WebKit
class TestShellDevToolsCallArgs;
class TestShellDevToolsClient;
class TestShellDevToolsAgent : public WebKit::WebDevToolsAgentClient {
public:
TestShellDevToolsAgent();
virtual ~TestShellDevToolsAgent() {}
void SetWebView(WebKit::WebView* web_view);
// WebDevToolsAgentClient implementation.
virtual void sendMessageToInspectorFrontend(
const WebKit::WebString& data);
virtual int hostIdentifier() { return routing_id_; }
virtual void forceRepaint();
virtual void runtimeFeatureStateChanged(const WebKit::WebString& feature,
bool enabled);
virtual WebKit::WebCString injectedScriptSource();
virtual WebKit::WebCString debuggerScriptSource();
virtual WebKit::WebDevToolsAgentClient::WebKitClientMessageLoop*
createClientMessageLoop();
void AsyncCall(const TestShellDevToolsCallArgs& args);
void attach(TestShellDevToolsClient* client);
void detach();
void frontendLoaded();
bool evaluateInWebInspector(long call_id, const std::string& script);
bool setTimelineProfilingEnabled(bool enable);
private:
void Call(const TestShellDevToolsCallArgs& args);
static void DispatchMessageLoop();
WebKit::WebDevToolsAgent* GetWebAgent();
ScopedRunnableMethodFactory<TestShellDevToolsAgent> call_method_factory_;
TestShellDevToolsClient* dev_tools_client_;
int routing_id_;
WebKit::WebDevToolsAgent* web_dev_tools_agent_;
WebKit::WebView* web_view_;
DISALLOW_COPY_AND_ASSIGN(TestShellDevToolsAgent);
};
#endif // TEST_SHELL_DEVTOOLS_AGENT_H_
|