chenwilliam | fed5bda | 2017-03-24 02:01:06 | [diff] [blame] | 1 | // Copyright 2017 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_SHELL_BROWSER_SHELL_DEVTOOLS_BINDINGS_H_ |
| 6 | #define CONTENT_SHELL_BROWSER_SHELL_DEVTOOLS_BINDINGS_H_ |
| 7 | |
| 8 | #include <memory> |
Andrey Kosyakov | 942286d4 | 2018-03-22 02:12:38 | [diff] [blame] | 9 | #include <set> |
chenwilliam | fed5bda | 2017-03-24 02:01:06 | [diff] [blame] | 10 | |
| 11 | #include "base/compiler_specific.h" |
Andrey Kosyakov | 942286d4 | 2018-03-22 02:12:38 | [diff] [blame] | 12 | #include "base/containers/unique_ptr_adapters.h" |
chenwilliam | fed5bda | 2017-03-24 02:01:06 | [diff] [blame] | 13 | #include "base/macros.h" |
| 14 | #include "base/memory/ref_counted.h" |
| 15 | #include "base/memory/weak_ptr.h" |
| 16 | #include "base/values.h" |
| 17 | #include "content/public/browser/devtools_agent_host.h" |
| 18 | #include "content/public/browser/devtools_frontend_host.h" |
| 19 | #include "content/public/browser/web_contents_observer.h" |
| 20 | #include "net/url_request/url_fetcher_delegate.h" |
| 21 | |
| 22 | #if !defined(OS_ANDROID) |
| 23 | #include "content/public/browser/devtools_frontend_host.h" |
| 24 | #endif |
| 25 | |
| 26 | namespace base { |
| 27 | class Value; |
| 28 | } |
| 29 | |
| 30 | namespace content { |
| 31 | |
Pavel Feldman | ad5aa4eb | 2017-06-13 21:13:59 | [diff] [blame] | 32 | class NavigationHandle; |
| 33 | |
chenwilliam | fed5bda | 2017-03-24 02:01:06 | [diff] [blame] | 34 | class ShellDevToolsDelegate { |
| 35 | public: |
| 36 | virtual void Close() = 0; |
| 37 | virtual ~ShellDevToolsDelegate(){}; |
| 38 | }; |
| 39 | |
| 40 | class WebContents; |
| 41 | |
| 42 | class ShellDevToolsBindings : public WebContentsObserver, |
| 43 | public DevToolsAgentHostClient, |
| 44 | public net::URLFetcherDelegate { |
| 45 | public: |
| 46 | ShellDevToolsBindings(WebContents* devtools_contents, |
| 47 | WebContents* inspected_contents, |
| 48 | ShellDevToolsDelegate* delegate); |
| 49 | |
| 50 | void InspectElementAt(int x, int y); |
Will Chen | 8bbdf20f | 2017-12-12 21:09:54 | [diff] [blame] | 51 | virtual void Attach(); |
chenwilliam | fed5bda | 2017-03-24 02:01:06 | [diff] [
|