Home | History | Annotate | Download | only in renderer
      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 
     11 namespace IPC {
     12 class Message;
     13 }
     14 
     15 namespace content {
     16 
     17 // Base class for objects that want to filter control IPC messages and get
     18 // notified of events.
     19 class 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   // Called when the network state changes.
     39   virtual void NetworkStateChanged(bool online) {}
     40 
     41  private:
     42   DISALLOW_COPY_AND_ASSIGN(RenderProcessObserver);
     43 };
     44 
     45 }  // namespace content
     46 
     47 #endif  // CONTENT_PUBLIC_RENDERER_RENDER_PROCESS_OBSERVER_H_
     48