Refactor management of overview window copy lifetime into a separate class.
[chromium-blink-merge.git] / content / shell / browser / shell_devtools_frontend.h
blob09a690ac76b2a95de9390271aa7ea002cfa228cd
1 // Copyright 2013 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.
5 #ifndef CONTENT_SHELL_BROWSER_SHELL_DEVTOOLS_FRONTEND_H_
6 #define CONTENT_SHELL_BROWSER_SHELL_DEVTOOLS_FRONTEND_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "content/public/browser/devtools_agent_host.h"
13 #include "content/public/browser/devtools_client_host.h"
14 #include "content/public/browser/devtools_frontend_host_delegate.h"
15 #include "content/public/browser/web_contents_observer.h"
17 namespace content {
19 class RenderViewHost;
20 class Shell;
21 class WebContents;
23 class ShellDevToolsFrontend : public WebContentsObserver,
24 public DevToolsFrontendHostDelegate {
25 public:
26 static ShellDevToolsFrontend* Show(WebContents* inspected_contents);
27 void Activate();
28 void Focus();
29 void Close();
31 Shell* frontend_shell() const { return frontend_shell_; }
33 private:
34 ShellDevToolsFrontend(Shell* frontend_shell, DevToolsAgentHost* agent_host);
35 virtual ~ShellDevToolsFrontend();
37 // WebContentsObserver overrides
38 virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE;
39 virtual void WebContentsDestroyed(WebContents* web_contents) OVERRIDE;
41 // DevToolsFrontendHostDelegate implementation
42 virtual void DispatchOnEmbedder(const std::string& message) OVERRIDE {}
44 virtual void InspectedContentsClosing() OVERRIDE;
46 Shell* frontend_shell_;
47 scoped_refptr<DevToolsAgentHost> agent_host_;
48 scoped_ptr<DevToolsClientHost> frontend_host_;
50 DISALLOW_COPY_AND_ASSIGN(ShellDevToolsFrontend);
53 } // namespace content
55 #endif // CONTENT_SHELL_BROWSER_SHELL_DEVTOOLS_FRONTEND_H_