[content shell] implement testRunner.overridePreference
[chromium-blink-merge.git] / content / shell / shell_content_renderer_client.h
bloba71e3b4ca5378d211460546f4d8f277fd44975a7
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_SHELL_SHELL_CONTENT_RENDERER_CLIENT_H_
6 #define CONTENT_SHELL_SHELL_CONTENT_RENDERER_CLIENT_H_
8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "content/public/renderer/content_renderer_client.h"
12 namespace WebKit {
13 class WebFrame;
14 class WebPlugin;
15 struct WebPluginParams;
18 namespace WebTestRunner {
19 class WebTestProxyBase;
22 namespace content {
24 class RenderView;
25 class ShellRenderProcessObserver;
27 class ShellContentRendererClient : public ContentRendererClient {
28 public:
29 ShellContentRendererClient();
30 virtual ~ShellContentRendererClient();
31 virtual void RenderThreadStarted() OVERRIDE;
32 virtual bool OverrideCreatePlugin(
33 RenderView* render_view,
34 WebKit::WebFrame* frame,
35 const WebKit::WebPluginParams& params,
36 WebKit::WebPlugin** plugin) OVERRIDE;
37 virtual bool WillSendRequest(WebKit::WebFrame* frame,
38 PageTransition transition_type,
39 const GURL& url,
40 const GURL& first_party_for_cookies,
41 GURL* new_url) OVERRIDE;
43 private:
44 void WebTestProxyCreated(RenderView* render_view,
45 WebTestRunner::WebTestProxyBase* proxy);
46 GURL RewriteLayoutTestsURL(const GURL& url);
48 scoped_ptr<ShellRenderProcessObserver> shell_observer_;
51 } // namespace content
53 #endif // CONTENT_SHELL_SHELL_CONTENT_RENDERER_CLIENT_H_