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_SHELL_SHELL_RENDER_PROCESS_OBSERVER_H_ | 5 #ifndef CONTENT_SHELL_SHELL_RENDER_PROCESS_OBSERVER_H_ |
6 #define CONTENT_SHELL_SHELL_RENDER_PROCESS_OBSERVER_H_ | 6 #define CONTENT_SHELL_SHELL_RENDER_PROCESS_OBSERVER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" |
10 #include "content/public/renderer/render_process_observer.h" | 11 #include "content/public/renderer/render_process_observer.h" |
11 | 12 |
| 13 namespace WebKit { |
| 14 class WebFrame; |
| 15 } |
| 16 |
| 17 namespace WebTestRunner { |
| 18 class WebTestDelegate; |
| 19 class WebTestInterfaces; |
| 20 } |
| 21 |
12 namespace content { | 22 namespace content { |
13 | 23 |
| 24 class RenderView; |
| 25 |
14 class ShellRenderProcessObserver : public RenderProcessObserver { | 26 class ShellRenderProcessObserver : public RenderProcessObserver { |
15 public: | 27 public: |
| 28 static ShellRenderProcessObserver* GetInstance(); |
| 29 |
16 ShellRenderProcessObserver(); | 30 ShellRenderProcessObserver(); |
17 virtual ~ShellRenderProcessObserver(); | 31 virtual ~ShellRenderProcessObserver(); |
18 | 32 |
| 33 void SetMainWindow(RenderView* view, |
| 34 WebTestRunner::WebTestDelegate* delegate); |
| 35 void BindTestRunnersToWindow(WebKit::WebFrame* frame); |
| 36 |
19 // RenderProcessObserver implementation. | 37 // RenderProcessObserver implementation. |
20 virtual void WebKitInitialized() OVERRIDE; | 38 virtual void WebKitInitialized() OVERRIDE; |
| 39 virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE; |
21 | 40 |
22 private: | 41 private: |
| 42 // Message handlers. |
| 43 void OnResetAll(); |
| 44 |
| 45 scoped_ptr<WebTestRunner::WebTestInterfaces> test_interfaces_; |
| 46 WebTestRunner::WebTestDelegate* test_delegate_; |
| 47 |
23 DISALLOW_COPY_AND_ASSIGN(ShellRenderProcessObserver); | 48 DISALLOW_COPY_AND_ASSIGN(ShellRenderProcessObserver); |
24 }; | 49 }; |
25 | 50 |
26 } // namespace content | 51 } // namespace content |
27 | 52 |
28 #endif // CONTENT_SHELL_SHELL_RENDER_PROCESS_OBSERVER_H_ | 53 #endif // CONTENT_SHELL_SHELL_RENDER_PROCESS_OBSERVER_H_ |
OLD | NEW |