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

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

Issue 2755973003: DevTools: android shouldn't depend on devtools frontend (Closed)
Patch Set: fix 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
« no previous file with comments | « content/public/browser/BUILD.gn ('k') | content/shell/BUILD.gn » ('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 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 is not supported on Android.
22 class DevToolsFrontendHost { 23 class DevToolsFrontendHost {
23 public: 24 public:
24 using HandleMessageCallback = base::Callback<void(const std::string&)>; 25 using HandleMessageCallback = base::Callback<void(const std::string&)>;
25 26
26 // Creates a new DevToolsFrontendHost for RenderFrameHost where DevTools 27 // Creates a new DevToolsFrontendHost for RenderFrameHost where DevTools
27 // frontend is loaded. 28 // frontend is loaded.
28 CONTENT_EXPORT static DevToolsFrontendHost* Create( 29 CONTENT_EXPORT static DevToolsFrontendHost* Create(
29 RenderFrameHost* frontend_main_frame, 30 RenderFrameHost* frontend_main_frame,
30 const HandleMessageCallback& handle_message_callback); 31 const HandleMessageCallback& handle_message_callback);
31 32
32 CONTENT_EXPORT virtual ~DevToolsFrontendHost() {} 33 CONTENT_EXPORT virtual ~DevToolsFrontendHost() {}
33 34
34 CONTENT_EXPORT virtual void BadMessageRecieved() {} 35 CONTENT_EXPORT virtual void BadMessageRecieved() {}
35 36
36 // Returns bundled DevTools frontend resource by |path|. Returns empty string 37 // Returns bundled DevTools frontend resource by |path|. Returns empty string
37 // if |path| does not correspond to any frontend resource. 38 // if |path| does not correspond to any frontend resource.
38 CONTENT_EXPORT static base::StringPiece GetFrontendResource( 39 CONTENT_EXPORT static base::StringPiece GetFrontendResource(
39 const std::string& path); 40 const std::string& path);
40 }; 41 };
41 42
42 } // namespace content 43 } // namespace content
43 44
44 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_HOST_H_ 45 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_HOST_H_
OLDNEW
« no previous file with comments | « content/public/browser/BUILD.gn ('k') | content/shell/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698