| 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 4a4a5614954d99ba659906b10472d9776ceaecb6..bdddd83c2e598d23edbcf99fbaa7d1fdbce701ac 100644
|
| --- a/chrome/browser/devtools/devtools_target_impl.h
|
| +++ b/chrome/browser/devtools/devtools_target_impl.h
|
| @@ -8,18 +8,16 @@
|
| #include <vector>
|
|
|
| #include "base/callback.h"
|
| -#include "content/public/browser/devtools_target.h"
|
| -#include "content/public/browser/worker_service.h"
|
| +#include "components/devtools_discovery/basic_target_descriptor.h"
|
|
|
| class Profile;
|
|
|
| namespace content {
|
| class DevToolsAgentHost;
|
| -class RenderViewHost;
|
| class WebContents;
|
| }
|
|
|
| -class DevToolsTargetImpl : public content::DevToolsTarget {
|
| +class DevToolsTargetImpl : public devtools_discovery::BasicTargetDescriptor {
|
| public:
|
| static const char kTargetTypeApp[];
|
| static const char kTargetTypeBackgroundPage[];
|
| @@ -34,23 +32,9 @@ class DevToolsTargetImpl : public content::DevToolsTarget {
|
| scoped_refptr<content::DevToolsAgentHost> agent_host);
|
| ~DevToolsTargetImpl() override;
|
|
|
| - // content::DevToolsTarget overrides:
|
| - std::string GetId() const override;
|
| - std::string GetParentId() const override;
|
| - std::string GetType() const override;
|
| - std::string GetTitle() const override;
|
| - std::string GetDescription() const override;
|
| - GURL GetURL() const override;
|
| - GURL GetFaviconURL() const override;
|
| - base::TimeTicks GetLastActivityTime() const override;
|
| - scoped_refptr<content::DevToolsAgentHost> GetAgentHost() const override;
|
| - bool IsAttached() const override;
|
| - bool Activate() const override;
|
| - bool Close() const override;
|
| -
|
| // Returns the WebContents associated with the target on NULL if there is
|
| // not any.
|
| - virtual content::WebContents* GetWebContents() const;
|
| + content::WebContents* GetWebContents() const;
|
|
|
| // Returns the tab id if the target is associated with a tab, -1 otherwise.
|
| virtual int GetTabId() const;
|
| @@ -65,35 +49,12 @@ class DevToolsTargetImpl : public content::DevToolsTarget {
|
| // Reload the target page.
|
| virtual void Reload() const;
|
|
|
| - // Creates a new target associated with WebContents.
|
| - static scoped_ptr<DevToolsTargetImpl> CreateForWebContents(
|
| - content::WebContents* web_contents,
|
| - bool is_tab);
|
| -
|
| - void set_parent_id(const std::string& parent_id) { parent_id_ = parent_id; }
|
| - void set_type(const std::string& type) { type_ = type; }
|
| - void set_title(const std::string& title) { title_ = title; }
|
| - void set_description(const std::string& desc) { description_ = desc; }
|
| - void set_url(const GURL& url) { url_ = url; }
|
| - void set_favicon_url(const GURL& url) { favicon_url_ = url; }
|
| - void set_last_activity_time(const base::TimeTicks& time) {
|
| - last_activity_time_ = time;
|
| - }
|
| -
|
| - typedef std::vector<DevToolsTargetImpl*> List;
|
| - typedef base::Callback<void(const List&)> Callback;
|
| -
|
| - static void EnumerateAllTargets(Callback callback);
|
| + // Creates a new target associated with tab.
|
| + static scoped_ptr<DevToolsTargetImpl> CreateForTab(
|
| + content::WebContents* web_contents);
|
|
|
| - private:
|
| - scoped_refptr<content::DevToolsAgentHost> agent_host_;
|
| - std::string parent_id_;
|
| - std::string type_;
|
| - std::string title_;
|
| - std::string description_;
|
| - GURL url_;
|
| - GURL favicon_url_;
|
| - base::TimeTicks last_activity_time_;
|
| + // Caller takes ownership of returned objects.
|
| + static std::vector<DevToolsTargetImpl*> EnumerateAll();
|
| };
|
|
|
| #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_TARGET_IMPL_H_
|
|
|