- add sources.
[platform/framework/web/crosswalk.git] / src / ozone / impl / ipc / child_process_observer.h
1 // Copyright 2013 Intel Corporation. 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 OZONE_IMPL_IPC_CHILD_PROCESS_OBSERVER_H_
6 #define OZONE_IMPL_IPC_CHILD_PROCESS_OBSERVER_H_
7
8 #include "content/public/browser/browser_child_process_observer.h"
9 #include "content/public/browser/child_process_data.h"
10
11 namespace ozonewayland {
12
13 class OzoneDisplay;
14
15 // OzoneProcessObserver extends BrowserChildProcessObserver. This class is used
16 // to observe GPU process being forked or re-spawned for various reasons. This
17 // can be used to add an ipc filter and listen to any relevant messages coming
18 // from GpuProcess side.
19 class OzoneProcessObserver : public content::BrowserChildProcessObserver {
20  public:
21   explicit OzoneProcessObserver(OzoneDisplay* observer);
22   virtual ~OzoneProcessObserver();
23   // Implement |BrowserChildProcessObserver|.
24
25   virtual void BrowserChildProcessHostConnected(
26     const content::ChildProcessData& data) OVERRIDE;
27
28   void WillDestroyCurrentMessageLoop();
29
30  private:
31   OzoneDisplay* observer_;
32   DISALLOW_COPY_AND_ASSIGN(OzoneProcessObserver);
33 };
34
35 }  // namespace ozonewayland
36
37 #endif  // OZONE_IMPL_IPC_CHILD_PROCESS_OBSERVER_H_