Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Side by Side Diff: content/shell/browser/shell_devtools_frontend.h

Issue 870883008: Test runner: make inspector tests reuse a single inspector process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: for landing Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/shell/browser/shell.cc ('k') | content/shell/browser/shell_devtools_frontend.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_SHELL_BROWSER_SHELL_DEVTOOLS_FRONTEND_H_ 5 #ifndef CONTENT_SHELL_BROWSER_SHELL_DEVTOOLS_FRONTEND_H_
6 #define CONTENT_SHELL_BROWSER_SHELL_DEVTOOLS_FRONTEND_H_ 6 #define CONTENT_SHELL_BROWSER_SHELL_DEVTOOLS_FRONTEND_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 12 matching lines...) Expand all
23 public DevToolsFrontendHost::Delegate, 23 public DevToolsFrontendHost::Delegate,
24 public DevToolsAgentHostClient { 24 public DevToolsAgentHostClient {
25 public: 25 public:
26 static ShellDevToolsFrontend* Show(WebContents* inspected_contents); 26 static ShellDevToolsFrontend* Show(WebContents* inspected_contents);
27 27
28 void Activate(); 28 void Activate();
29 void Focus(); 29 void Focus();
30 void InspectElementAt(int x, int y); 30 void InspectElementAt(int x, int y);
31 void Close(); 31 void Close();
32 32
33 void DisconnectFromTarget();
34
33 Shell* frontend_shell() const { return frontend_shell_; } 35 Shell* frontend_shell() const { return frontend_shell_; }
34 36
35 protected: 37 protected:
36 ShellDevToolsFrontend(Shell* frontend_shell, DevToolsAgentHost* agent_host); 38 ShellDevToolsFrontend(Shell* frontend_shell, DevToolsAgentHost* agent_host);
37 ~ShellDevToolsFrontend() override; 39 ~ShellDevToolsFrontend() override;
38 40
41 // content::DevToolsAgentHostClient implementation.
42 void AgentHostClosed(DevToolsAgentHost* agent_host, bool replaced) override;
43 void DispatchProtocolMessage(DevToolsAgentHost* agent_host,
44 const std::string& message) override;
45 void AttachTo(WebContents* inspected_contents);
46
39 private: 47 private:
40 // WebContentsObserver overrides 48 // WebContentsObserver overrides
41 void RenderViewCreated(RenderViewHost* render_view_host) override; 49 void RenderViewCreated(RenderViewHost* render_view_host) override;
50 void DidNavigateMainFrame(
51 const LoadCommittedDetails& details,
52 const FrameNavigateParams& params) override;
42 void WebContentsDestroyed() override; 53 void WebContentsDestroyed() override;
43 54
44 // content::DevToolsFrontendHost::Delegate implementation. 55 // content::DevToolsFrontendHost::Delegate implementation.
45 void HandleMessageFromDevToolsFrontend(const std::string& message) override; 56 void HandleMessageFromDevToolsFrontend(const std::string& message) override;
46 void HandleMessageFromDevToolsFrontendToBackend( 57 void HandleMessageFromDevToolsFrontendToBackend(
47 const std::string& message) override; 58 const std::string& message) override;
48 59
49 // content::DevToolsAgentHostClient implementation.
50 void DispatchProtocolMessage(DevToolsAgentHost* agent_host,
51 const std::string& message) override;
52 void AgentHostClosed(DevToolsAgentHost* agent_host, bool replaced) override;
53
54 Shell* frontend_shell_; 60 Shell* frontend_shell_;
55 scoped_refptr<DevToolsAgentHost> agent_host_; 61 scoped_refptr<DevToolsAgentHost> agent_host_;
56 scoped_ptr<DevToolsFrontendHost> frontend_host_; 62 scoped_ptr<DevToolsFrontendHost> frontend_host_;
57 63
58 DISALLOW_COPY_AND_ASSIGN(ShellDevToolsFrontend); 64 DISALLOW_COPY_AND_ASSIGN(ShellDevToolsFrontend);
59 }; 65 };
60 66
61 } // namespace content 67 } // namespace content
62 68
63 #endif // CONTENT_SHELL_BROWSER_SHELL_DEVTOOLS_FRONTEND_H_ 69 #endif // CONTENT_SHELL_BROWSER_SHELL_DEVTOOLS_FRONTEND_H_
OLDNEW
« no previous file with comments | « content/shell/browser/shell.cc ('k') | content/shell/browser/shell_devtools_frontend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698