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

Side by Side 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: Same with Fetch for fetching discovery pages. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_WEBUI_INSPECT_UI_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_INSPECT_UI_H_
6 #define CHROME_BROWSER_UI_WEBUI_INSPECT_UI_H_ 6 #define CHROME_BROWSER_UI_WEBUI_INSPECT_UI_H_
7 7
8 #include <map>
yurys 2013/03/11 07:21:21 Remove this.
9
8 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "chrome/browser/devtools/devtools_adb_bridge.h"
9 #include "content/public/browser/notification_observer.h" 12 #include "content/public/browser/notification_observer.h"
10 #include "content/public/browser/notification_registrar.h" 13 #include "content/public/browser/notification_registrar.h"
11 #include "content/public/browser/web_ui_controller.h" 14 #include "content/public/browser/web_ui_controller.h"
15 #include "content/public/browser/web_ui_data_source.h"
12 16
13 class InspectUI : public content::WebUIController, 17 class InspectUI : public content::WebUIController,
14 public content::NotificationObserver { 18 public content::NotificationObserver {
15 public: 19 public:
16 explicit InspectUI(content::WebUI* web_ui); 20 explicit InspectUI(content::WebUI* web_ui);
17 virtual ~InspectUI(); 21 virtual ~InspectUI();
18 22
19 void RefreshUI(); 23 void RefreshUI();
20 24
21 private: 25 private:
22 class WorkerCreationDestructionListener; 26 class WorkerCreationDestructionListener;
23 27
24 // content::NotificationObserver overrides. 28 // content::NotificationObserver overrides.
25 virtual void Observe(int type, 29 virtual void Observe(int type,
26 const content::NotificationSource& source, 30 const content::NotificationSource& source,
27 const content::NotificationDetails& details) OVERRIDE; 31 const content::NotificationDetails& details) OVERRIDE;
28 32
29 void StopListeningNotifications(); 33 void StopListeningNotifications();
30 34
35 content::WebUIDataSource* CreateInspectUIHTMLSource();
36
37 bool HandleRequestCallback(
38 const std::string& path,
39 const content::WebUIDataSource::GotDataCallback& callback);
40
41 bool HandleAdbQueryCallback(
42 const std::string& path,
43 const content::WebUIDataSource::GotDataCallback& callback);
44
45 bool HandleLocalXhrCallback(
46 const std::string& path,
47 const content::WebUIDataSource::GotDataCallback& callback);
48
49 void OnAdbResponse(
50 const content::WebUIDataSource::GotDataCallback& callback,
51 const std::string& error,
52 const std::string& data);
53
31 scoped_refptr<WorkerCreationDestructionListener> observer_; 54 scoped_refptr<WorkerCreationDestructionListener> observer_;
32 55
33 // A scoped container for notification registries. 56 // A scoped container for notification registries.
34 content::NotificationRegistrar registrar_; 57 content::NotificationRegistrar registrar_;
35 58
59 scoped_refptr<DevToolsAdbBridge> adb_bridge_;
60
36 DISALLOW_COPY_AND_ASSIGN(InspectUI); 61 DISALLOW_COPY_AND_ASSIGN(InspectUI);
37 }; 62 };
38 63
39 #endif // CHROME_BROWSER_UI_WEBUI_INSPECT_UI_H_ 64 #endif // CHROME_BROWSER_UI_WEBUI_INSPECT_UI_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698