Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(499)

Side by Side Diff: content/shell/shell_render_process_observer.h

Issue 12090066: [content shell] ShellRenderProcessObserver no longer depends on WebTestInterfaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: disable tests which depend on eventsender Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/file_path.h" 10 #include "base/file_path.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "content/public/renderer/render_process_observer.h" 12 #include "content/public/renderer/render_process_observer.h"
13 13
14 namespace WebKit { 14 namespace WebKit {
15 class WebFrame; 15 class WebFrame;
16 } 16 }
17 17
18 namespace WebTestRunner { 18 namespace WebTestRunner {
19 class WebTestDelegate; 19 class WebTestDelegate;
20 class WebTestInterfaces;
21 } 20 }
22 21
23 namespace content { 22 namespace content {
24 23
25 class RenderView; 24 class RenderView;
26 class WebKitTestRunner; 25 class WebKitTestRunner;
27 26
28 class ShellRenderProcessObserver : public RenderProcessObserver { 27 class ShellRenderProcessObserver : public RenderProcessObserver {
29 public: 28 public:
30 static ShellRenderProcessObserver* GetInstance(); 29 static ShellRenderProcessObserver* GetInstance();
31 30
32 ShellRenderProcessObserver(); 31 ShellRenderProcessObserver();
33 virtual ~ShellRenderProcessObserver(); 32 virtual ~ShellRenderProcessObserver();
34 33
35 void SetMainWindow(RenderView* view, 34 void SetMainWindow(RenderView* view,
36 WebKitTestRunner* test_runner, 35 WebKitTestRunner* test_runner,
37 WebTestRunner::WebTestDelegate* delegate); 36 WebTestRunner::WebTestDelegate* delegate);
38 void BindTestRunnersToWindow(WebKit::WebFrame* frame); 37 void BindTestRunnersToWindow(WebKit::WebFrame* frame);
39 38
40 // RenderProcessObserver implementation. 39 // RenderProcessObserver implementation.
41 virtual void WebKitInitialized() OVERRIDE; 40 virtual void WebKitInitialized() OVERRIDE;
42 virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE; 41 virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE;
43 42
44 WebTestRunner::WebTestDelegate* test_delegate() const { 43 WebTestRunner::WebTestDelegate* test_delegate() const {
45 return test_delegate_; 44 return test_delegate_;
46 } 45 }
47 WebTestRunner::WebTestInterfaces* test_interfaces() const {
48 return test_interfaces_.get();
49 }
50 WebKitTestRunner* main_test_runner() const { return main_test_runner_; } 46 WebKitTestRunner* main_test_runner() const { return main_test_runner_; }
51 const FilePath& webkit_source_dir() const { return webkit_source_dir_; } 47 const FilePath& webkit_source_dir() const { return webkit_source_dir_; }
52 48
53 private: 49 private:
54 // Message handlers. 50 // Message handlers.
55 void OnResetAll(); 51 void OnResetAll();
56 void OnSetWebKitSourceDir(const FilePath& webkit_source_dir); 52 void OnSetWebKitSourceDir(const FilePath& webkit_source_dir);
57 53
58 scoped_ptr<WebTestRunner::WebTestInterfaces> test_interfaces_;
59 RenderView* main_render_view_; 54 RenderView* main_render_view_;
60 WebKitTestRunner* main_test_runner_; 55 WebKitTestRunner* main_test_runner_;
61 WebTestRunner::WebTestDelegate* test_delegate_; 56 WebTestRunner::WebTestDelegate* test_delegate_;
62 57
63 FilePath webkit_source_dir_; 58 FilePath webkit_source_dir_;
64 59
65 DISALLOW_COPY_AND_ASSIGN(ShellRenderProcessObserver); 60 DISALLOW_COPY_AND_ASSIGN(ShellRenderProcessObserver);
66 }; 61 };
67 62
68 } // namespace content 63 } // namespace content
69 64
70 #endif // CONTENT_SHELL_SHELL_RENDER_PROCESS_OBSERVER_H_ 65 #endif // CONTENT_SHELL_SHELL_RENDER_PROCESS_OBSERVER_H_
OLDNEW
« no previous file with comments | « content/shell/shell_content_renderer_client.cc ('k') | content/shell/shell_render_process_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698