blob: 265f3d13d8a17f7f970d14ea1298c09ce1299188 (
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
|
// Copyright (c) 2012 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 CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_HOST_DELEGATE_H_
#define CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_HOST_DELEGATE_H_
#include <string>
namespace content {
// Clients that want to use default DevTools front-end implementation should
// implement this interface to provide access to the embedding browser from
// the front-end.
class DevToolsFrontendHostDelegate {
public:
virtual ~DevToolsFrontendHostDelegate() {}
// Should bring DevTools window to front.
virtual void ActivateWindow() = 0;
// Closes DevTools front-end window.
virtual void CloseWindow() = 0;
// Moves DevTols front-end windo.
virtual void MoveWindow(int x, int y) = 0;
// Specifies side for devtools to dock to.
virtual void SetDockSide(const std::string& side) = 0;
// Opens given |url| in a new contents.
virtual void OpenInNewTab(const std::string& url) = 0;
// Saves given |content| associated with the given |url|. Optionally showing
// Save As dialog.
virtual void SaveToFile(const std::string& url,
const std::string& content,
bool save_as) = 0;
// Appends given |content| to the file that has been associated with the
// given |url| by SaveToFile method.
virtual void AppendToFile(const std::string& url,
const std::string& content) = 0;
// This method is called when the contents inspected by this devtools frontend
// is closing.
virtual void InspectedContentsClosing() = 0;
// This method is called when the contents inspected by this devtools frontend
// is navigating to |url|.
virtual void FrameNavigating(const std::string& url) = 0;
// Invoked when the contents inspected by this devtools frontend is replaced
// by another contents. This is triggered by
// TabStripModel::ReplaceTabContentsAt.
virtual void ContentsReplaced(WebContents* new_contents) = 0;
};
} // namespace content
#endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_HOST_DELEGATE_H_
|