| Index: chrome/browser/ui/webui/inspect_ui.h
|
| diff --git a/chrome/browser/ui/webui/inspect_ui.h b/chrome/browser/ui/webui/inspect_ui.h
|
| index d1d186e578876c2581a93a1854677a8a4eb71fbb..1f73cf94efc562f3c5b4b064818f7f11d0dcae29 100644
|
| --- a/chrome/browser/ui/webui/inspect_ui.h
|
| +++ b/chrome/browser/ui/webui/inspect_ui.h
|
| @@ -10,7 +10,6 @@
|
| #include "base/memory/ref_counted.h"
|
| #include "base/memory/weak_ptr.h"
|
| #include "base/prefs/pref_change_registrar.h"
|
| -#include "chrome/browser/devtools/devtools_adb_bridge.h"
|
| #include "content/public/browser/notification_observer.h"
|
| #include "content/public/browser/notification_registrar.h"
|
| #include "content/public/browser/web_ui_controller.h"
|
| @@ -18,32 +17,31 @@
|
|
|
| namespace base {
|
| class Value;
|
| +class ListValue;
|
| }
|
|
|
| class Browser;
|
| -class DevToolsTargetImpl;
|
| +class DevToolsRemoteTargetsUIHandler;
|
| +class DevToolsTargetsUIHandler;
|
|
|
| class InspectUI : public content::WebUIController,
|
| - public content::NotificationObserver,
|
| - public DevToolsAdbBridge::Listener {
|
| + public content::NotificationObserver {
|
| public:
|
| explicit InspectUI(content::WebUI* web_ui);
|
| virtual ~InspectUI();
|
|
|
| void InitUI();
|
| - DevToolsTargetImpl* FindTarget(const std::string& type,
|
| - const std::string& id);
|
| - scoped_refptr<DevToolsAdbBridge::RemoteBrowser> FindRemoteBrowser(
|
| - const std::string& id);
|
| + void Inspect(const std::string& source_id, const std::string& target_id);
|
| + void Activate(const std::string& source_id, const std::string& target_id);
|
| + void Close(const std::string& source_id, const std::string& target_id);
|
| + void Reload(const std::string& source_id, const std::string& target_id);
|
| + void Open(const std::string& source_id,
|
| + const std::string& browser_id,
|
| + const std::string& url);
|
|
|
| static void InspectDevices(Browser* browser);
|
|
|
| private:
|
| - class WorkerCreationDestructionListener;
|
| -
|
| - void PopulateWebContentsTargets();
|
| - void PopulateWorkerTargets(const std::vector<DevToolsTargetImpl*>&);
|
| -
|
| // content::NotificationObserver overrides.
|
| virtual void Observe(int type,
|
| const content::NotificationSource& source,
|
| @@ -54,10 +52,6 @@ class InspectUI : public content::WebUIController,
|
|
|
| content::WebUIDataSource* CreateInspectUIHTMLSource();
|
|
|
| - // DevToolsAdbBridge::Listener overrides.
|
| - virtual void RemoteDevicesChanged(
|
| - DevToolsAdbBridge::RemoteDevices* devices) OVERRIDE;
|
| -
|
| void UpdateDiscoverUsbDevicesEnabled();
|
| void UpdatePortForwardingEnabled();
|
| void UpdatePortForwardingConfig();
|
| @@ -66,7 +60,17 @@ class InspectUI : public content::WebUIController,
|
|
|
| const base::Value* GetPrefValue(const char* name);
|
|
|
| - scoped_refptr<WorkerCreationDestructionListener> observer_;
|
| + void AddTargetUIHandler(
|
| + scoped_ptr<DevToolsTargetsUIHandler> handler);
|
| + void AddRemoteTargetUIHandler(
|
| + scoped_ptr<DevToolsRemoteTargetsUIHandler> handler);
|
| +
|
| + DevToolsTargetsUIHandler* FindTargetHandler(const std::string& source_id);
|
| + DevToolsRemoteTargetsUIHandler* FindRemoteTargetHandler(
|
| + const std::string& source_id);
|
| +
|
| + void PopulateTargets(const std::string& source_id,
|
| + scoped_ptr<base::ListValue> targets);
|
|
|
| // A scoped container for notification registries.
|
| content::NotificationRegistrar notification_registrar_;
|
| @@ -74,14 +78,12 @@ class InspectUI : public content::WebUIController,
|
| // A scoped container for preference change registries.
|
| PrefChangeRegistrar pref_change_registrar_;
|
|
|
| - typedef std::map<std::string, DevToolsTargetImpl*> TargetMap;
|
| - TargetMap render_view_host_targets_;
|
| - TargetMap worker_targets_;
|
| - TargetMap remote_targets_;
|
| + typedef std::map<std::string, DevToolsTargetsUIHandler*> TargetHandlerMap;
|
| + TargetHandlerMap target_handlers_;
|
|
|
| - typedef std::map<std::string,
|
| - scoped_refptr<DevToolsAdbBridge::RemoteBrowser> > RemoteBrowsers;
|
| - RemoteBrowsers remote_browsers_;
|
| + typedef std::map<std::string, DevToolsRemoteTargetsUIHandler*>
|
| + RemoteTargetHandlerMap;
|
| + RemoteTargetHandlerMap remote_target_handlers_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(InspectUI);
|
| };
|
|
|