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 28 matching lines...) Expand all Loading... |
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 // WebUIController implementation. |
| 50 virtual bool OverrideHandleWebUIMessage(const GURL& source_url, |
| 51 const std::string& message, |
| 52 const base::ListValue& args) OVERRIDE; |
| 53 |
| 54 // We forward these to |serviceworker_webui_|. |
| 55 virtual void RenderViewCreated( |
| 56 content::RenderViewHost* render_view_host) OVERRIDE; |
| 57 virtual void RenderViewReused( |
| 58 content::RenderViewHost* render_view_host) OVERRIDE; |
| 59 |
49 private: | 60 private: |
50 // content::NotificationObserver overrides. | 61 // content::NotificationObserver overrides. |
51 virtual void Observe(int type, | 62 virtual void Observe(int type, |
52 const content::NotificationSource& source, | 63 const content::NotificationSource& source, |
53 const content::NotificationDetails& details) OVERRIDE; | 64 const content::NotificationDetails& details) OVERRIDE; |
54 | 65 |
55 void StartListeningNotifications(); | 66 void StartListeningNotifications(); |
56 void StopListeningNotifications(); | 67 void StopListeningNotifications(); |
57 | 68 |
58 content::WebUIDataSource* CreateInspectUIHTMLSource(); | 69 content::WebUIDataSource* CreateInspectUIHTMLSource(); |
(...skipping 23 matching lines...) Expand all Loading... |
82 content::NotificationRegistrar notification_registrar_; | 93 content::NotificationRegistrar notification_registrar_; |
83 | 94 |
84 // A scoped container for preference change registries. | 95 // A scoped container for preference change registries. |
85 PrefChangeRegistrar pref_change_registrar_; | 96 PrefChangeRegistrar pref_change_registrar_; |
86 | 97 |
87 typedef std::map<std::string, DevToolsTargetsUIHandler*> TargetHandlerMap; | 98 typedef std::map<std::string, DevToolsTargetsUIHandler*> TargetHandlerMap; |
88 TargetHandlerMap target_handlers_; | 99 TargetHandlerMap target_handlers_; |
89 | 100 |
90 scoped_ptr<PortForwardingStatusSerializer> port_status_serializer_; | 101 scoped_ptr<PortForwardingStatusSerializer> port_status_serializer_; |
91 | 102 |
| 103 scoped_ptr<content::WebUI> serviceworker_webui_; |
| 104 |
92 DISALLOW_COPY_AND_ASSIGN(InspectUI); | 105 DISALLOW_COPY_AND_ASSIGN(InspectUI); |
93 }; | 106 }; |
94 | 107 |
95 #endif // CHROME_BROWSER_UI_WEBUI_INSPECT_UI_H_ | 108 #endif // CHROME_BROWSER_UI_WEBUI_INSPECT_UI_H_ |
OLD | NEW |