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

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: Extracted protocol http request helper. 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
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..c2694fb4acb83009dbfd9885843ae016de08af7f 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 {
@@ -28,11 +33,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);
};

Powered by Google App Engine
This is Rietveld 408576698