Give names to all utility processes.
[chromium-blink-merge.git] / content / shell / renderer / layout_test / layout_test_render_process_observer.h
blobfe05d4fd296f04ac2fef623c044ef03239eb9e0f
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_SHELL_RENDERER_LAYOUT_TEST_LAYOUT_TEST_RENDER_PROCESS_OBSERVER_H_
6 #define CONTENT_SHELL_RENDERER_LAYOUT_TEST_LAYOUT_TEST_RENDER_PROCESS_OBSERVER_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "base/files/file_path.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "content/public/renderer/render_process_observer.h"
13 #include "ipc/ipc_platform_file.h"
15 namespace blink {
16 class WebFrame;
19 namespace content {
21 class RenderView;
22 class WebKitTestRunner;
23 class WebTestDelegate;
24 class WebTestInterfaces;
26 class LayoutTestRenderProcessObserver : public RenderProcessObserver {
27 public:
28 static LayoutTestRenderProcessObserver* GetInstance();
30 LayoutTestRenderProcessObserver();
31 ~LayoutTestRenderProcessObserver() override;
33 void SetTestDelegate(WebTestDelegate* delegate);
34 void SetMainWindow(RenderView* view);
36 // RenderProcessObserver implementation.
37 void WebKitInitialized() override;
38 void OnRenderProcessShutdown() override;
39 bool OnControlMessageReceived(const IPC::Message& message) override;
41 WebTestDelegate* test_delegate() const {
42 return test_delegate_;
44 WebTestInterfaces* test_interfaces() const {
45 return test_interfaces_.get();
47 WebKitTestRunner* main_test_runner() const { return main_test_runner_; }
48 const base::FilePath& webkit_source_dir() const { return webkit_source_dir_; }
50 private:
51 // Message handlers.
52 void OnSetWebKitSourceDir(const base::FilePath& webkit_source_dir);
54 WebKitTestRunner* main_test_runner_;
55 WebTestDelegate* test_delegate_;
56 scoped_ptr<WebTestInterfaces> test_interfaces_;
58 base::FilePath webkit_source_dir_;
60 DISALLOW_COPY_AND_ASSIGN(LayoutTestRenderProcessObserver);
63 } // namespace content
65 #endif // CONTENT_SHELL_RENDERER_LAYOUT_TEST_LAYOUT_TEST_RENDER_PROCESS_OBSERVER_H_