Content settings: remove some plugin-related code/resources when... there are no...
[chromium-blink-merge.git] / content / shell / renderer / layout_test / layout_test_render_process_observer.h
blob2fa4ac6f1c628452355f1958dff2e4e5666e58cb
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 test_runner {
20 class WebTestDelegate;
21 class WebTestInterfaces;
24 namespace content {
26 class RenderView;
27 class BlinkTestRunner;
29 class LayoutTestRenderProcessObserver : public RenderProcessObserver {
30 public:
31 static LayoutTestRenderProcessObserver* GetInstance();
33 LayoutTestRenderProcessObserver();
34 ~LayoutTestRenderProcessObserver() override;
36 void SetTestDelegate(test_runner::WebTestDelegate* delegate);
37 void SetMainWindow(RenderView* view);
39 // RenderProcessObserver implementation.
40 void WebKitInitialized() override;
41 void OnRenderProcessShutdown() override;
42 bool OnControlMessageReceived(const IPC::Message& message) override;
44 test_runner::WebTestDelegate* test_delegate() const {
45 return test_delegate_;
47 test_runner::WebTestInterfaces* test_interfaces() const {
48 return test_interfaces_.get();
50 BlinkTestRunner* main_test_runner() const { return main_test_runner_; }
51 const base::FilePath& webkit_source_dir() const { return webkit_source_dir_; }
53 private:
54 // Message handlers.
55 void OnSetWebKitSourceDir(const base::FilePath& webkit_source_dir);
57 BlinkTestRunner* main_test_runner_;
58 test_runner::WebTestDelegate* test_delegate_;
59 scoped_ptr<test_runner::WebTestInterfaces> test_interfaces_;
61 base::FilePath webkit_source_dir_;
63 DISALLOW_COPY_AND_ASSIGN(LayoutTestRenderProcessObserver);
66 } // namespace content
68 #endif // CONTENT_SHELL_RENDERER_LAYOUT_TEST_LAYOUT_TEST_RENDER_PROCESS_OBSERVER_H_