// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CONTENT_SHELL_SHELL_CONTENT_RENDERER_CLIENT_H_ #define CONTENT_SHELL_SHELL_CONTENT_RENDERER_CLIENT_H_ #include "base/compiler_specific.h" #include "base/memory/scoped_ptr.h" #include "content/public/renderer/content_renderer_client.h" namespace WebKit { class WebFrame; class WebPlugin; struct WebPluginParams; } namespace WebTestRunner { class WebTestProxyBase; } namespace content { class RenderView; class ShellRenderProcessObserver; class ShellContentRendererClient : public ContentRendererClient { public: ShellContentRendererClient(); virtual ~ShellContentRendererClient(); virtual void RenderThreadStarted() OVERRIDE; virtual bool OverrideCreatePlugin( RenderView* render_view, WebKit::WebFrame* frame, const WebKit::WebPluginParams& params, WebKit::WebPlugin** plugin) OVERRIDE; virtual bool WillSendRequest(WebKit::WebFrame* frame, PageTransition transition_type, const GURL& url, const GURL& first_party_for_cookies, GURL* new_url) OVERRIDE; private: void WebTestProxyCreated(RenderView* render_view, WebTestRunner::WebTestProxyBase* proxy); GURL RewriteLayoutTestsURL(const GURL& url); scoped_ptr shell_observer_; }; } // namespace content #endif // CONTENT_SHELL_SHELL_CONTENT_RENDERER_CLIENT_H_