Update V8 to version 4.5.107.
[chromium-blink-merge.git] / content / shell / renderer / shell_content_renderer_client.cc
blob8ad5a68f3ea7e18843357fe348f8887b0cb89464
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 #include "content/shell/renderer/shell_content_renderer_client.h"
7 #include "base/command_line.h"
8 #include "components/web_cache/renderer/web_cache_render_process_observer.h"
9 #include "content/public/renderer/render_thread.h"
10 #include "content/shell/renderer/shell_render_view_observer.h"
11 #include "ppapi/shared_impl/ppapi_switches.h"
12 #include "third_party/WebKit/public/web/WebView.h"
13 #include "v8/include/v8.h"
15 namespace content {
17 ShellContentRendererClient::ShellContentRendererClient() {
20 ShellContentRendererClient::~ShellContentRendererClient() {
23 void ShellContentRendererClient::RenderThreadStarted() {
24 RenderThread* thread = RenderThread::Get();
25 web_cache_observer_.reset(new web_cache::WebCacheRenderProcessObserver());
26 thread->AddObserver(web_cache_observer_.get());
29 void ShellContentRendererClient::RenderViewCreated(RenderView* render_view) {
30 new ShellRenderViewObserver(render_view);
33 bool ShellContentRendererClient::IsPluginAllowedToUseCompositorAPI(
34 const GURL& url) {
35 return base::CommandLine::ForCurrentProcess()->HasSwitch(
36 switches::kEnablePepperTesting);
39 bool ShellContentRendererClient::IsPluginAllowedToUseDevChannelAPIs() {
40 return base::CommandLine::ForCurrentProcess()->HasSwitch(
41 switches::kEnablePepperTesting);
44 } // namespace content