| 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_PROCESS_OBSERVER_H_ | 5 #ifndef CONTENT_PUBLIC_RENDERER_RENDER_PROCESS_OBSERVER_H_ |
| 6 #define CONTENT_PUBLIC_RENDERER_RENDER_PROCESS_OBSERVER_H_ | 6 #define CONTENT_PUBLIC_RENDERER_RENDER_PROCESS_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 | 10 |
| 11 namespace IPC { | 11 namespace IPC { |
| 12 class Message; | 12 class Message; |
| 13 } | 13 } |
| 14 | 14 |
| 15 namespace content { | 15 namespace content { |
| 16 | 16 |
| 17 // Base class for objects that want to filter control IPC messages and get | 17 // Base class for objects that want to filter control IPC messages and get |
| 18 // notified of events. | 18 // notified of events. |
| 19 class CONTENT_EXPORT RenderProcessObserver { | 19 class CONTENT_EXPORT RenderProcessObserver { |
| 20 public: | 20 public: |
| 21 RenderProcessObserver() {} | 21 RenderProcessObserver() {} |
| 22 virtual ~RenderProcessObserver() {} | 22 virtual ~RenderProcessObserver() {} |
| 23 | 23 |
| 24 // Allows filtering of control messages. | 24 // Allows filtering of control messages. |
| 25 virtual bool OnControlMessageReceived(const IPC::Message& message); | 25 virtual bool OnControlMessageReceived(const IPC::Message& message); |
| 26 | 26 |
| 27 // Notification that the render process is shutting down. | 27 // Notification that the render process is shutting down. |
| 28 virtual void OnRenderProcessShutdown() {} | 28 virtual void OnRenderProcessShutdown() {} |
| 29 | 29 |
| 30 // Called right after the WebKit API is initialized. | |
| 31 virtual void WebKitInitialized() {} | |
| 32 | |
| 33 // Called when the renderer cache of the plugin list has changed. | 30 // Called when the renderer cache of the plugin list has changed. |
| 34 virtual void PluginListChanged() {} | 31 virtual void PluginListChanged() {} |
| 35 | 32 |
| 36 virtual void IdleNotification() {} | 33 virtual void IdleNotification() {} |
| 37 | 34 |
| 38 // Called when the network state changes. | 35 // Called when the network state changes. |
| 39 virtual void NetworkStateChanged(bool online) {} | 36 virtual void NetworkStateChanged(bool online) {} |
| 40 | 37 |
| 41 private: | 38 private: |
| 42 DISALLOW_COPY_AND_ASSIGN(RenderProcessObserver); | 39 DISALLOW_COPY_AND_ASSIGN(RenderProcessObserver); |
| 43 }; | 40 }; |
| 44 | 41 |
| 45 } // namespace content | 42 } // namespace content |
| 46 | 43 |
| 47 #endif // CONTENT_PUBLIC_RENDERER_RENDER_PROCESS_OBSERVER_H_ | 44 #endif // CONTENT_PUBLIC_RENDERER_RENDER_PROCESS_OBSERVER_H_ |
| OLD | NEW |