| OLD | NEW |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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_LAYOUT_TEST_RENDER_PROCESS_OBSERVER_H_ | 5 #ifndef CONTENT_SHELL_LAYOUT_TEST_RENDER_PROCESS_OBSERVER_H_ |
| 6 #define CONTENT_SHELL_LAYOUT_TEST_RENDER_PROCESS_OBSERVER_H_ | 6 #define CONTENT_SHELL_LAYOUT_TEST_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/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 class RenderView; | 21 class RenderView; |
| 22 class WebKitTestRunner; | 22 class WebKitTestRunner; |
| 23 class WebTestDelegate; | 23 class WebTestDelegate; |
| 24 class WebTestInterfaces; | 24 class WebTestInterfaces; |
| 25 | 25 |
| 26 class LayoutTestRenderProcessObserver : public RenderProcessObserver { | 26 class LayoutTestRenderProcessObserver : public RenderProcessObserver { |
| 27 public: | 27 public: |
| 28 static LayoutTestRenderProcessObserver* GetInstance(); | 28 static LayoutTestRenderProcessObserver* GetInstance(); |
| 29 | 29 |
| 30 LayoutTestRenderProcessObserver(); | 30 LayoutTestRenderProcessObserver(); |
| 31 virtual ~LayoutTestRenderProcessObserver(); | 31 ~LayoutTestRenderProcessObserver() override; |
| 32 | 32 |
| 33 void SetTestDelegate(WebTestDelegate* delegate); | 33 void SetTestDelegate(WebTestDelegate* delegate); |
| 34 void SetMainWindow(RenderView* view); | 34 void SetMainWindow(RenderView* view); |
| 35 | 35 |
| 36 // RenderProcessObserver implementation. | 36 // RenderProcessObserver implementation. |
| 37 virtual void WebKitInitialized() override; | 37 void WebKitInitialized() override; |
| 38 virtual void OnRenderProcessShutdown() override; | 38 void OnRenderProcessShutdown() override; |
| 39 virtual bool OnControlMessageReceived(const IPC::Message& message) override; | 39 bool OnControlMessageReceived(const IPC::Message& message) override; |
| 40 | 40 |
| 41 WebTestDelegate* test_delegate() const { | 41 WebTestDelegate* test_delegate() const { |
| 42 return test_delegate_; | 42 return test_delegate_; |
| 43 } | 43 } |
| 44 WebTestInterfaces* test_interfaces() const { | 44 WebTestInterfaces* test_interfaces() const { |
| 45 return test_interfaces_.get(); | 45 return test_interfaces_.get(); |
| 46 } | 46 } |
| 47 WebKitTestRunner* main_test_runner() const { return main_test_runner_; } | 47 WebKitTestRunner* main_test_runner() const { return main_test_runner_; } |
| 48 const base::FilePath& webkit_source_dir() const { return webkit_source_dir_; } | 48 const base::FilePath& webkit_source_dir() const { return webkit_source_dir_; } |
| 49 | 49 |
| 50 private: | 50 private: |
| 51 // Message handlers. | 51 // Message handlers. |
| 52 void OnSetWebKitSourceDir(const base::FilePath& webkit_source_dir); | 52 void OnSetWebKitSourceDir(const base::FilePath& webkit_source_dir); |
| 53 | 53 |
| 54 WebKitTestRunner* main_test_runner_; | 54 WebKitTestRunner* main_test_runner_; |
| 55 WebTestDelegate* test_delegate_; | 55 WebTestDelegate* test_delegate_; |
| 56 scoped_ptr<WebTestInterfaces> test_interfaces_; | 56 scoped_ptr<WebTestInterfaces> test_interfaces_; |
| 57 | 57 |
| 58 base::FilePath webkit_source_dir_; | 58 base::FilePath webkit_source_dir_; |
| 59 | 59 |
| 60 DISALLOW_COPY_AND_ASSIGN(LayoutTestRenderProcessObserver); | 60 DISALLOW_COPY_AND_ASSIGN(LayoutTestRenderProcessObserver); |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 } // namespace content | 63 } // namespace content |
| 64 | 64 |
| 65 #endif // CONTENT_SHELL_LAYOUT_TEST_RENDER_PROCESS_OBSERVER_H_ | 65 #endif // CONTENT_SHELL_LAYOUT_TEST_RENDER_PROCESS_OBSERVER_H_ |
| OLD | NEW |