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

Side by Side Diff: content/public/browser/devtools_frontend_host.h

Issue 744653002: Ignore DevTools messages from the old inspected RVH after navigation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comment Created 6 years 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_HOST_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_HOST_H_
6 #define CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_HOST_H_ 6 #define CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_HOST_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 class RenderViewHost; 14 class WebContents;
15 15
16 // This class dispatches messages between DevTools frontend and Delegate 16 // This class dispatches messages between DevTools frontend and Delegate
17 // which is implemented by the embedder. 17 // which is implemented by the embedder.
18 // This allows us to avoid exposing DevTools frontend messages through 18 // This allows us to avoid exposing DevTools frontend messages through
19 // the content public API. 19 // the content public API.
20 class DevToolsFrontendHost { 20 class DevToolsFrontendHost {
21 public: 21 public:
22 // Delegate actually handles messages from frontend. 22 // Delegate actually handles messages from frontend.
23 class Delegate { 23 class Delegate {
24 public: 24 public:
25 virtual ~Delegate() {} 25 virtual ~Delegate() {}
26 26
27 // Message is coming from frontend to the embedder. 27 // Message is coming from frontend to the embedder.
28 virtual void HandleMessageFromDevToolsFrontend( 28 virtual void HandleMessageFromDevToolsFrontend(
29 const std::string& message) = 0; 29 const std::string& message) = 0;
30 30
31 // Message is coming from frontend to the backend. 31 // Message is coming from frontend to the backend.
32 // TODO(dgozman): remove this by making one of the possible messages 32 // TODO(dgozman): remove this by making one of the possible messages
33 // passed via the method above. 33 // passed via the method above.
34 virtual void HandleMessageFromDevToolsFrontendToBackend( 34 virtual void HandleMessageFromDevToolsFrontendToBackend(
35 const std::string& message) = 0; 35 const std::string& message) = 0;
36 }; 36 };
37 37
38 // Creates a new DevToolsFrontendHost for RenderViewHost where DevTools 38 // Creates a new DevToolsFrontendHost for WebContents where DevTools
39 // frontend is loaded. 39 // frontend is loaded.
40 CONTENT_EXPORT static DevToolsFrontendHost* Create( 40 CONTENT_EXPORT static DevToolsFrontendHost* Create(
41 RenderViewHost* frontend_rvh, Delegate* delegate); 41 WebContents* frontend_web_contents,
42 Delegate* delegate);
42 43
43 CONTENT_EXPORT virtual ~DevToolsFrontendHost() {} 44 CONTENT_EXPORT virtual ~DevToolsFrontendHost() {}
44 }; 45 };
45 46
46 } // namespace content 47 } // namespace content
47 48
48 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_HOST_H_ 49 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_HOST_H_
OLDNEW
« no previous file with comments | « content/browser/devtools/render_view_devtools_agent_host.cc ('k') | content/renderer/devtools/devtools_agent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698