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_CONTENT_RENDERER_CLIENT_H_ | 5 #ifndef CONTENT_SHELL_SHELL_CONTENT_RENDERER_CLIENT_H_ |
6 #define CONTENT_SHELL_SHELL_CONTENT_RENDERER_CLIENT_H_ | 6 #define CONTENT_SHELL_SHELL_CONTENT_RENDERER_CLIENT_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/platform_file.h" | 10 #include "base/platform_file.h" |
11 #include "content/public/renderer/content_renderer_client.h" | 11 #include "content/public/renderer/content_renderer_client.h" |
12 | 12 |
13 namespace WebKit { | 13 namespace WebKit { |
14 class WebFrame; | 14 class WebFrame; |
15 class WebPlugin; | 15 class WebPlugin; |
16 struct WebPluginParams; | 16 struct WebPluginParams; |
17 } | 17 } |
18 | 18 |
19 namespace WebTestRunner { | 19 namespace WebTestRunner { |
20 class WebTestProxyBase; | 20 class WebTestProxyBase; |
21 } | 21 } |
22 | 22 |
23 namespace webkit_glue { | |
24 class MockWebHyphenator; | |
25 } | |
26 | |
27 class MockWebClipboardImpl; | 23 class MockWebClipboardImpl; |
28 | 24 |
29 namespace content { | 25 namespace content { |
30 | 26 |
31 class ShellRenderProcessObserver; | 27 class ShellRenderProcessObserver; |
32 | 28 |
33 class ShellContentRendererClient : public ContentRendererClient { | 29 class ShellContentRendererClient : public ContentRendererClient { |
34 public: | 30 public: |
35 static ShellContentRendererClient* Get(); | 31 static ShellContentRendererClient* Get(); |
36 | 32 |
37 ShellContentRendererClient(); | 33 ShellContentRendererClient(); |
38 virtual ~ShellContentRendererClient(); | 34 virtual ~ShellContentRendererClient(); |
39 | 35 |
40 void LoadHyphenDictionary(base::PlatformFile dict_file); | |
41 | |
42 // ContentRendererClient implementation. | 36 // ContentRendererClient implementation. |
43 virtual void RenderThreadStarted() OVERRIDE; | 37 virtual void RenderThreadStarted() OVERRIDE; |
44 virtual void RenderViewCreated(RenderView* render_view) OVERRIDE; | 38 virtual void RenderViewCreated(RenderView* render_view) OVERRIDE; |
45 virtual bool OverrideCreatePlugin( | 39 virtual bool OverrideCreatePlugin( |
46 RenderView* render_view, | 40 RenderView* render_view, |
47 WebKit::WebFrame* frame, | 41 WebKit::WebFrame* frame, |
48 const WebKit::WebPluginParams& params, | 42 const WebKit::WebPluginParams& params, |
49 WebKit::WebPlugin** plugin) OVERRIDE; | 43 WebKit::WebPlugin** plugin) OVERRIDE; |
50 virtual WebKit::WebMediaStreamCenter* OverrideCreateWebMediaStreamCenter( | 44 virtual WebKit::WebMediaStreamCenter* OverrideCreateWebMediaStreamCenter( |
51 WebKit::WebMediaStreamCenterClient* client) OVERRIDE; | 45 WebKit::WebMediaStreamCenterClient* client) OVERRIDE; |
52 virtual WebKit::WebRTCPeerConnectionHandler* | 46 virtual WebKit::WebRTCPeerConnectionHandler* |
53 OverrideCreateWebRTCPeerConnectionHandler( | 47 OverrideCreateWebRTCPeerConnectionHandler( |
54 WebKit::WebRTCPeerConnectionHandlerClient* client) OVERRIDE; | 48 WebKit::WebRTCPeerConnectionHandlerClient* client) OVERRIDE; |
55 virtual WebKit::WebMIDIAccessor* OverrideCreateMIDIAccessor( | 49 virtual WebKit::WebMIDIAccessor* OverrideCreateMIDIAccessor( |
56 WebKit::WebMIDIAccessorClient* client) OVERRIDE; | 50 WebKit::WebMIDIAccessorClient* client) OVERRIDE; |
57 virtual WebKit::WebAudioDevice* OverrideCreateAudioDevice( | 51 virtual WebKit::WebAudioDevice* OverrideCreateAudioDevice( |
58 double sample_rate) OVERRIDE; | 52 double sample_rate) OVERRIDE; |
59 virtual WebKit::WebClipboard* OverrideWebClipboard() OVERRIDE; | 53 virtual WebKit::WebClipboard* OverrideWebClipboard() OVERRIDE; |
60 virtual WebKit::WebCrypto* OverrideWebCrypto() OVERRIDE; | 54 virtual WebKit::WebCrypto* OverrideWebCrypto() OVERRIDE; |
61 virtual WebKit::WebHyphenator* OverrideWebHyphenator() OVERRIDE; | |
62 virtual WebKit::WebThemeEngine* OverrideThemeEngine() OVERRIDE; | 55 virtual WebKit::WebThemeEngine* OverrideThemeEngine() OVERRIDE; |
63 virtual bool AllowBrowserPlugin( | 56 virtual bool AllowBrowserPlugin( |
64 WebKit::WebPluginContainer* container) const OVERRIDE; | 57 WebKit::WebPluginContainer* container) const OVERRIDE; |
65 | 58 |
66 private: | 59 private: |
67 void WebTestProxyCreated(RenderView* render_view, | 60 void WebTestProxyCreated(RenderView* render_view, |
68 WebTestRunner::WebTestProxyBase* proxy); | 61 WebTestRunner::WebTestProxyBase* proxy); |
69 | 62 |
70 scoped_ptr<ShellRenderProcessObserver> shell_observer_; | 63 scoped_ptr<ShellRenderProcessObserver> shell_observer_; |
71 scoped_ptr<MockWebClipboardImpl> clipboard_; | 64 scoped_ptr<MockWebClipboardImpl> clipboard_; |
72 scoped_ptr<webkit_glue::MockWebHyphenator> hyphenator_; | |
73 }; | 65 }; |
74 | 66 |
75 } // namespace content | 67 } // namespace content |
76 | 68 |
77 #endif // CONTENT_SHELL_SHELL_CONTENT_RENDERER_CLIENT_H_ | 69 #endif // CONTENT_SHELL_SHELL_CONTENT_RENDERER_CLIENT_H_ |
OLD | NEW |