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

Unified Diff: chrome/browser/ui/webui/inspect_ui.h

Issue 12559008: DevTools: add backend for discovering connected ADB devices. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Offline review comments addressed Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/inspect/inspect.js ('k') | chrome/browser/ui/webui/inspect_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4f25433628dab0558bb46cad3bb7850376b6915a..f18284284927887c7c88f749fcb10ee0b06a5b34 100644
--- a/chrome/browser/ui/webui/inspect_ui.h
+++ b/chrome/browser/ui/webui/inspect_ui.h
@@ -5,10 +5,15 @@
#ifndef CHROME_BROWSER_UI_WEBUI_INSPECT_UI_H_
#define CHROME_BROWSER_UI_WEBUI_INSPECT_UI_H_
+#include <map>
+
#include "base/memory/ref_counted.h"
+#include "base/memory/weak_ptr.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"
+#include "content/public/browser/web_ui_data_source.h"
class InspectUI : public content::WebUIController,
public content::NotificationObserver {
@@ -21,6 +26,11 @@ class InspectUI : public content::WebUIController,
private:
class WorkerCreationDestructionListener;
+ static bool WeakHandleRequestCallback(
+ const base::WeakPtr<InspectUI>& inspect_ui,
+ const std::string& path,
+ const content::WebUIDataSource::GotDataCallback& callback);
+
// content::NotificationObserver overrides.
virtual void Observe(int type,
const content::NotificationSource& source,
@@ -28,11 +38,34 @@ class InspectUI : public content::WebUIController,
void StopListeningNotifications();
+ content::WebUIDataSource* CreateInspectUIHTMLSource();
+
+ bool HandleRequestCallback(
+ const std::string& path,
+ const content::WebUIDataSource::GotDataCallback& callback);
+
+ bool HandleAdbQueryCallback(
+ const std::string& path,
+ const content::WebUIDataSource::GotDataCallback& callback);
+
+ bool HandleLocalXhrCallback(
+ const std::string& path,
+ const content::WebUIDataSource::GotDataCallback& callback);
+
+ void RespondOnUIThread(
+ const content::WebUIDataSource::GotDataCallback& callback,
+ const std::string& error,
+ const std::string& data);
+
+
scoped_refptr<WorkerCreationDestructionListener> observer_;
// A scoped container for notification registries.
content::NotificationRegistrar registrar_;
+ scoped_refptr<DevToolsAdbBridge> adb_bridge_;
+ base::WeakPtrFactory<InspectUI> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(InspectUI);
};
« no previous file with comments | « chrome/browser/resources/inspect/inspect.js ('k') | chrome/browser/ui/webui/inspect_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698