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

Unified Diff: chrome/browser/devtools/devtools_target_impl.h

Issue 2289773002: Revert of DevTools: merge devtools target with devtools host, part 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/devtools/devtools_target_impl.h
diff --git a/chrome/browser/devtools/devtools_target_impl.h b/chrome/browser/devtools/devtools_target_impl.h
index 2fe0b8e871611432e09bbc2991b273efc3f93e40..6322a3af6f43c0d4ebe9b4a4fda1d5f4e8813eaf 100644
--- a/chrome/browser/devtools/devtools_target_impl.h
+++ b/chrome/browser/devtools/devtools_target_impl.h
@@ -20,9 +20,40 @@
class DevToolsTargetImpl : public devtools_discovery::BasicTargetDescriptor {
public:
+ static const char kTargetTypeApp[];
+ static const char kTargetTypeBackgroundPage[];
+ static const char kTargetTypePage[];
+ static const char kTargetTypeWorker[];
+ static const char kTargetTypeWebView[];
+ static const char kTargetTypeIFrame[];
+ static const char kTargetTypeNode[];
+ static const char kTargetTypeOther[];
+ static const char kTargetTypeServiceWorker[];
+
explicit DevToolsTargetImpl(
scoped_refptr<content::DevToolsAgentHost> agent_host);
~DevToolsTargetImpl() override;
+
+ // Returns the WebContents associated with the target on NULL if there is
+ // not any.
+ content::WebContents* GetWebContents() const;
+
+ // Returns the tab id if the target is associated with a tab, -1 otherwise.
+ virtual int GetTabId() const;
+
+ // Returns the extension id if the target is associated with an extension
+ // background page.
+ virtual std::string GetExtensionId() const;
+
+ // Open a new DevTools window or activate the existing one.
+ virtual void Inspect(Profile* profile) const;
+
+ // Reload the target page.
+ virtual void Reload() const;
+
+ // Creates a new target associated with tab.
+ static std::unique_ptr<DevToolsTargetImpl> CreateForTab(
+ content::WebContents* web_contents);
// Caller takes ownership of returned objects.
static std::vector<DevToolsTargetImpl*> EnumerateAll();
« no previous file with comments | « chrome/browser/devtools/device/devtools_android_bridge.cc ('k') | chrome/browser/devtools/devtools_target_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698