OLD | NEW |
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> | 8 #include <map> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 class Browser; | 23 class Browser; |
24 class DevToolsTargetsUIHandler; | 24 class DevToolsTargetsUIHandler; |
25 class DevToolsTargetImpl; | 25 class DevToolsTargetImpl; |
26 class PortForwardingStatusSerializer; | 26 class PortForwardingStatusSerializer; |
27 | 27 |
28 class InspectUI : public content::WebUIController, | 28 class InspectUI : public content::WebUIController, |
29 public content::NotificationObserver { | 29 public content::NotificationObserver { |
30 public: | 30 public: |
31 explicit InspectUI(content::WebUI* web_ui); | 31 explicit InspectUI(content::WebUI* web_ui); |
32 virtual ~InspectUI(); | 32 ~InspectUI() override; |
33 | 33 |
34 void InitUI(); | 34 void InitUI(); |
35 void Inspect(const std::string& source_id, const std::string& target_id); | 35 void Inspect(const std::string& source_id, const std::string& target_id); |
36 void Activate(const std::string& source_id, const std::string& target_id); | 36 void Activate(const std::string& source_id, const std::string& target_id); |
37 void Close(const std::string& source_id, const std::string& target_id); | 37 void Close(const std::string& source_id, const std::string& target_id); |
38 void Reload(const std::string& source_id, const std::string& target_id); | 38 void Reload(const std::string& source_id, const std::string& target_id); |
39 void Open(const std::string& source_id, | 39 void Open(const std::string& source_id, |
40 const std::string& browser_id, | 40 const std::string& browser_id, |
41 const std::string& url); | 41 const std::string& url); |
42 void InspectBrowserWithCustomFrontend( | 42 void InspectBrowserWithCustomFrontend( |
43 const std::string& source_id, | 43 const std::string& source_id, |
44 const std::string& browser_id, | 44 const std::string& browser_id, |
45 const GURL& frontend_url); | 45 const GURL& frontend_url); |
46 | 46 |
47 static void InspectDevices(Browser* browser); | 47 static void InspectDevices(Browser* browser); |
48 | 48 |
49 private: | 49 private: |
50 // content::NotificationObserver overrides. | 50 // content::NotificationObserver overrides. |
51 virtual void Observe(int type, | 51 void Observe(int type, |
52 const content::NotificationSource& source, | 52 const content::NotificationSource& source, |
53 const content::NotificationDetails& details) override; | 53 const content::NotificationDetails& details) override; |
54 | 54 |
55 void StartListeningNotifications(); | 55 void StartListeningNotifications(); |
56 void StopListeningNotifications(); | 56 void StopListeningNotifications(); |
57 | 57 |
58 content::WebUIDataSource* CreateInspectUIHTMLSource(); | 58 content::WebUIDataSource* CreateInspectUIHTMLSource(); |
59 | 59 |
60 void UpdateDiscoverUsbDevicesEnabled(); | 60 void UpdateDiscoverUsbDevicesEnabled(); |
61 void UpdatePortForwardingEnabled(); | 61 void UpdatePortForwardingEnabled(); |
62 void UpdatePortForwardingConfig(); | 62 void UpdatePortForwardingConfig(); |
63 | 63 |
(...skipping 27 matching lines...) Expand all Loading... |
91 | 91 |
92 typedef std::map<std::string, DevToolsTargetsUIHandler*> TargetHandlerMap; | 92 typedef std::map<std::string, DevToolsTargetsUIHandler*> TargetHandlerMap; |
93 TargetHandlerMap target_handlers_; | 93 TargetHandlerMap target_handlers_; |
94 | 94 |
95 scoped_ptr<PortForwardingStatusSerializer> port_status_serializer_; | 95 scoped_ptr<PortForwardingStatusSerializer> port_status_serializer_; |
96 | 96 |
97 DISALLOW_COPY_AND_ASSIGN(InspectUI); | 97 DISALLOW_COPY_AND_ASSIGN(InspectUI); |
98 }; | 98 }; |
99 | 99 |
100 #endif // CHROME_BROWSER_UI_WEBUI_INSPECT_UI_H_ | 100 #endif // CHROME_BROWSER_UI_WEBUI_INSPECT_UI_H_ |
OLD | NEW |