OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_WINDOW_DELEGATE_H_ | |
6 #define CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_WINDOW_DELEGATE_H_ | |
7 #pragma once | |
8 | |
9 #include <string> | |
10 | |
11 namespace IPC { | |
12 class Message; | |
13 } | |
14 | |
15 namespace content { | |
16 | |
17 // Clients that want to use default DevTools front-end implementation should | |
18 // implement this interface to provide access to the embedding browser from | |
19 // the front-end. | |
20 class DevToolsFrontendWindowDelegate { | |
21 public: | |
22 virtual ~DevToolsFrontendWindowDelegate() {} | |
23 | |
24 // Routes message to the corresponding agent. | |
25 virtual void ForwardToDevToolsAgent(const IPC::Message& message) = 0; | |
26 | |
27 // Should bring DevTools window to front. | |
28 virtual void ActivateWindow() = 0; | |
29 | |
30 // Closes DevTools front-end window. | |
31 virtual void CloseWindow() = 0; | |
32 | |
33 // Moves DevTols front-end windo. | |
34 virtual void MoveWindow(int x, int y) = 0; | |
35 | |
36 // Attaches DevTools front-end to the inspected page. | |
37 virtual void DockWindow() = 0; | |
38 | |
39 // Detaches DevTools front-end from the inspected page and places it in its | |
40 // own window. | |
41 virtual void UndockWindow() = 0; | |
42 | |
43 // Shows "Save As..." dialog to save |content|. | |
44 virtual void SaveToFile(const std::string& suggested_file_name, | |
45 const std::string& content) = 0; | |
46 }; | |
47 | |
48 } // namespace content | |
49 | |
50 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_WINDOW_DELEGATE_H_ | |
OLD | NEW |