| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_RENDERER_RENDER_PROCESS_OBSERVER_H_ | 5 #ifndef CONTENT_PUBLIC_RENDERER_RENDER_PROCESS_OBSERVER_H_ |
| 6 #define CONTENT_RENDERER_RENDER_PROCESS_OBSERVER_H_ | 6 #define CONTENT_PUBLIC_RENDERER_RENDER_PROCESS_OBSERVER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "ipc/ipc_message.h" | |
| 11 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| 12 | 11 |
| 13 class GURL; | 12 namespace IPC { |
| 13 class Message; |
| 14 } |
| 15 |
| 16 namespace content { |
| 14 | 17 |
| 15 // 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 |
| 16 // notified of events. | 19 // notified of events. |
| 17 class CONTENT_EXPORT RenderProcessObserver : public IPC::Message::Sender { | 20 class CONTENT_EXPORT RenderProcessObserver { |
| 18 public: | 21 public: |
| 19 RenderProcessObserver(); | 22 RenderProcessObserver() {} |
| 20 virtual ~RenderProcessObserver(); | 23 virtual ~RenderProcessObserver() {} |
| 21 | |
| 22 // IPC::Message::Sender | |
| 23 virtual bool Send(IPC::Message* message); | |
| 24 | 24 |
| 25 // Allows filtering of control messages. | 25 // Allows filtering of control messages. |
| 26 virtual bool OnControlMessageReceived(const IPC::Message& message); | 26 virtual bool OnControlMessageReceived(const IPC::Message& message); |
| 27 | 27 |
| 28 // Notification that the render process is shutting down. | 28 // Notification that the render process is shutting down. |
| 29 virtual void OnRenderProcessShutdown(); | 29 virtual void OnRenderProcessShutdown() {} |
| 30 | 30 |
| 31 // Called right after the WebKit API is initialized. | 31 // Called right after the WebKit API is initialized. |
| 32 virtual void WebKitInitialized(); | 32 virtual void WebKitInitialized() {} |
| 33 | 33 |
| 34 virtual void IdleNotification(); | 34 virtual void IdleNotification() {} |
| 35 | 35 |
| 36 private: | 36 private: |
| 37 DISALLOW_COPY_AND_ASSIGN(RenderProcessObserver); | 37 DISALLOW_COPY_AND_ASSIGN(RenderProcessObserver); |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 #endif // CONTENT_RENDERER_RENDER_PROCESS_OBSERVER_H_ | 40 } // namespace content |
| 41 |
| 42 #endif // CONTENT_PUBLIC_RENDERER_RENDER_PROCESS_OBSERVER_H_ |
| OLD | NEW |