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