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

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

Issue 2755973003: DevTools: android shouldn't depend on devtools frontend (Closed)
Patch Set: fixup Created 3 years, 9 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
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 "base/callback.h" 10 #include "base/callback.h"
11 #include "base/strings/string_piece.h" 11 #include "base/strings/string_piece.h"
12 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
13 13
14 namespace content { 14 namespace content {
15 15
16 class RenderFrameHost; 16 class RenderFrameHost;
17 17
18 // This class dispatches messages between DevTools frontend and Delegate 18 // This class dispatches messages between DevTools frontend and Delegate
19 // which is implemented by the embedder. 19 // which is implemented by the embedder.
20 // This allows us to avoid exposing DevTools frontend messages through 20 // This allows us to avoid exposing DevTools frontend messages through
21 // the content public API. 21 // the content public API.
22 // Note: DevToolsFrontendHost & Impl not included in android;
dgozman 2017/03/21 00:08:43 Note: DevToolsFrontendHost is not supported on And
23 // only include this header for non-android
22 class DevToolsFrontendHost { 24 class DevToolsFrontendHost {
23 public: 25 public:
24 using HandleMessageCallback = base::Callback<void(const std::string&)>; 26 using HandleMessageCallback = base::Callback<void(const std::string&)>;
25 27
26 // Creates a new DevToolsFrontendHost for RenderFrameHost where DevTools 28 // Creates a new DevToolsFrontendHost for RenderFrameHost where DevTools
27 // frontend is loaded. 29 // frontend is loaded.
28 CONTENT_EXPORT static DevToolsFrontendHost* Create( 30 CONTENT_EXPORT static DevToolsFrontendHost* Create(
29 RenderFrameHost* frontend_main_frame, 31 RenderFrameHost* frontend_main_frame,
30 const HandleMessageCallback& handle_message_callback); 32 const HandleMessageCallback& handle_message_callback);
31 33
32 CONTENT_EXPORT virtual ~DevToolsFrontendHost() {} 34 CONTENT_EXPORT virtual ~DevToolsFrontendHost() {}
33 35
34 CONTENT_EXPORT virtual void BadMessageRecieved() {} 36 CONTENT_EXPORT virtual void BadMessageRecieved() {}
35 37
36 // Returns bundled DevTools frontend resource by |path|. Returns empty string 38 // Returns bundled DevTools frontend resource by |path|. Returns empty string
37 // if |path| does not correspond to any frontend resource. 39 // if |path| does not correspond to any frontend resource.
38 CONTENT_EXPORT static base::StringPiece GetFrontendResource( 40 CONTENT_EXPORT static base::StringPiece GetFrontendResource(
39 const std::string& path); 41 const std::string& path);
40 }; 42 };
41 43
42 } // namespace content 44 } // namespace content
43 45
44 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_HOST_H_ 46 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698