linux_aura: Disable the plugin install infobar.
[chromium-blink-merge.git] / content / shell / browser / shell_devtools_frontend.h
blobd9591c7eceaf77e1a689dff3d3dfc4cdd80a9b66
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 GURL GetDevToolsPathAsURL(const std::string& settings,
20 const std::string& frontend_url);
22 class RenderViewHost;
23 class Shell;
24 class WebContents;
26 class ShellDevToolsFrontend : public WebContentsObserver,
27 public DevToolsFrontendHostDelegate {
28 public:
29 static ShellDevToolsFrontend* Show(WebContents* inspected_contents);
30 static ShellDevToolsFrontend* Show(WebContents* inspected_contents,
31 const std::string& settings,
32 const std::string& frontend_url);
33 void Activate();
34 void Focus();
35 void InspectElementAt(int x, int y);
36 void Close();
38 Shell* frontend_shell() const { return frontend_shell_; }
40 private:
41 ShellDevToolsFrontend(Shell* frontend_shell, DevToolsAgentHost* agent_host);
42 virtual ~ShellDevToolsFrontend();
44 // WebContentsObserver overrides
45 virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE;
46 virtual void DocumentOnLoadCompletedInMainFrame() OVERRIDE;
47 virtual void WebContentsDestroyed() OVERRIDE;
49 // DevToolsFrontendHostDelegate implementation
50 virtual void DispatchOnEmbedder(const std::string& message) OVERRIDE {}
52 virtual void InspectedContentsClosing() OVERRIDE;
54 Shell* frontend_shell_;
55 scoped_refptr<DevToolsAgentHost> agent_host_;
56 scoped_ptr<DevToolsClientHost> frontend_host_;
58 DISALLOW_COPY_AND_ASSIGN(ShellDevToolsFrontend);
61 } // namespace content
63 #endif // CONTENT_SHELL_BROWSER_SHELL_DEVTOOLS_FRONTEND_H_