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 CONTENT_PUBLIC_RENDERER_RENDER_THREAD_OBSERVER_H_ | 5 #ifndef CONTENT_PUBLIC_RENDERER_RENDER_THREAD_OBSERVER_H_ |
6 #define CONTENT_PUBLIC_RENDERER_RENDER_THREAD_OBSERVER_H_ | 6 #define CONTENT_PUBLIC_RENDERER_RENDER_THREAD_OBSERVER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
| 10 #include "content/public/common/associated_interface_registry.h" |
10 | 11 |
11 namespace IPC { | 12 namespace IPC { |
12 class Message; | 13 class Message; |
13 } | 14 } |
14 | 15 |
15 namespace content { | 16 namespace content { |
16 | 17 |
17 // Base class for objects that want to filter control IPC messages and get | 18 // Base class for objects that want to filter control IPC messages and get |
18 // notified of events. | 19 // notified of events. |
19 class CONTENT_EXPORT RenderThreadObserver { | 20 class CONTENT_EXPORT RenderThreadObserver { |
20 public: | 21 public: |
21 RenderThreadObserver() {} | 22 RenderThreadObserver() {} |
22 virtual ~RenderThreadObserver() {} | 23 virtual ~RenderThreadObserver() {} |
23 | 24 |
| 25 // Allows handling incoming Mojo requests. |
| 26 virtual void RegisterMojoInterfaces( |
| 27 AssociatedInterfaceRegistry* associated_interfaces) {} |
| 28 virtual void UnregisterMojoInterfaces( |
| 29 AssociatedInterfaceRegistry* associated_interfaces) {} |
| 30 |
24 // Allows filtering of control messages. | 31 // Allows filtering of control messages. |
25 virtual bool OnControlMessageReceived(const IPC::Message& message); | 32 virtual bool OnControlMessageReceived(const IPC::Message& message); |
26 | 33 |
27 // Notification that the render process is shutting down. | 34 // Notification that the render process is shutting down. |
28 virtual void OnRenderProcessShutdown() {} | 35 virtual void OnRenderProcessShutdown() {} |
29 | 36 |
30 // Called when the renderer cache of the plugin list has changed. | 37 // Called when the renderer cache of the plugin list has changed. |
31 virtual void PluginListChanged() {} | 38 virtual void PluginListChanged() {} |
32 | 39 |
33 virtual void IdleNotification() {} | 40 virtual void IdleNotification() {} |
34 | 41 |
35 // Called when the network state changes. | 42 // Called when the network state changes. |
36 virtual void NetworkStateChanged(bool online) {} | 43 virtual void NetworkStateChanged(bool online) {} |
37 | 44 |
38 private: | 45 private: |
39 DISALLOW_COPY_AND_ASSIGN(RenderThreadObserver); | 46 DISALLOW_COPY_AND_ASSIGN(RenderThreadObserver); |
40 }; | 47 }; |
41 | 48 |
42 } // namespace content | 49 } // namespace content |
43 | 50 |
44 #endif // CONTENT_PUBLIC_RENDERER_RENDER_THREAD_OBSERVER_H_ | 51 #endif // CONTENT_PUBLIC_RENDERER_RENDER_THREAD_OBSERVER_H_ |
OLD | NEW |