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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "content/public/browser/notification_observer.h" | 10 #include "content/public/browser/notification_observer.h" |
11 #include "content/public/browser/notification_registrar.h" | 11 #include "content/public/browser/notification_registrar.h" |
12 #include "content/public/browser/web_ui_controller.h" | 12 #include "content/public/browser/web_ui_controller.h" |
13 | 13 |
14 class InspectUI : public content::WebUIController, | 14 class InspectUI : public content::WebUIController, |
15 public content::NotificationObserver { | 15 public content::NotificationObserver { |
16 public: | 16 public: |
17 explicit InspectUI(content::WebUI* web_ui); | 17 explicit InspectUI(content::WebUI* web_ui); |
18 virtual ~InspectUI(); | 18 virtual ~InspectUI(); |
19 | 19 |
20 void RefreshUI(); | 20 void RefreshUI(); |
21 | 21 |
22 private: | 22 private: |
23 class WorkerCreationDestructionListener; | 23 class WorkerCreationDestructionListener; |
24 | 24 |
25 // content::NotificationObserver overrides. | 25 // content::NotificationObserver overrides. |
26 virtual void Observe(int type, | 26 virtual void Observe(int type, |
27 const content::NotificationSource& source, | 27 const content::NotificationSource& source, |
28 const content::NotificationDetails& details) OVERRIDE; | 28 const content::NotificationDetails& details) OVERRIDE; |
29 | 29 |
| 30 void StopListeningNotifications(); |
| 31 |
30 scoped_refptr<WorkerCreationDestructionListener> observer_; | 32 scoped_refptr<WorkerCreationDestructionListener> observer_; |
31 | 33 |
32 // A scoped container for notification registries. | 34 // A scoped container for notification registries. |
33 content::NotificationRegistrar registrar_; | 35 content::NotificationRegistrar registrar_; |
34 | 36 |
35 DISALLOW_COPY_AND_ASSIGN(InspectUI); | 37 DISALLOW_COPY_AND_ASSIGN(InspectUI); |
36 }; | 38 }; |
37 | 39 |
38 #endif // CHROME_BROWSER_UI_WEBUI_INSPECT_UI_H_ | 40 #endif // CHROME_BROWSER_UI_WEBUI_INSPECT_UI_H_ |
OLD | NEW |