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 #include "content/shell/renderer/shell_content_renderer_client.h" | 5 #include "content/shell/renderer/shell_content_renderer_client.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/debugger.h" | 9 #include "base/debug/debugger.h" |
10 #include "content/common/sandbox_win.h" | 10 #include "content/common/sandbox_win.h" |
11 #include "content/public/common/content_constants.h" | 11 #include "content/public/common/content_constants.h" |
12 #include "content/public/common/content_switches.h" | 12 #include "content/public/common/content_switches.h" |
13 #include "content/public/renderer/render_view.h" | 13 #include "content/public/renderer/render_view.h" |
14 #include "content/public/test/layouttest_support.h" | 14 #include "content/public/test/layouttest_support.h" |
15 #include "content/shell/common/shell_switches.h" | 15 #include "content/shell/common/shell_switches.h" |
16 #include "content/shell/common/webkit_test_helpers.h" | 16 #include "content/shell/common/webkit_test_helpers.h" |
17 #include "content/shell/renderer/shell_render_frame_observer.h" | 17 #include "content/shell/renderer/shell_render_frame_observer.h" |
18 #include "content/shell/renderer/shell_render_process_observer.h" | 18 #include "content/shell/renderer/shell_render_process_observer.h" |
19 #include "content/shell/renderer/shell_render_view_observer.h" | 19 #include "content/shell/renderer/shell_render_view_observer.h" |
20 #include "content/shell/renderer/test_runner/WebTestInterfaces.h" | 20 #include "content/shell/renderer/test_runner/WebTestInterfaces.h" |
21 #include "content/shell/renderer/test_runner/web_test_proxy.h" | 21 #include "content/shell/renderer/test_runner/web_test_proxy.h" |
22 #include "content/shell/renderer/webkit_test_runner.h" | 22 #include "content/shell/renderer/webkit_test_runner.h" |
23 #include "content/test/mock_webclipboard_impl.h" | 23 #include "content/test/mock_webclipboard_impl.h" |
| 24 #include "ppapi/shared_impl/ppapi_switches.h" |
24 #include "third_party/WebKit/public/platform/WebMediaStreamCenter.h" | 25 #include "third_party/WebKit/public/platform/WebMediaStreamCenter.h" |
25 #include "third_party/WebKit/public/web/WebPluginParams.h" | 26 #include "third_party/WebKit/public/web/WebPluginParams.h" |
26 #include "third_party/WebKit/public/web/WebView.h" | 27 #include "third_party/WebKit/public/web/WebView.h" |
27 #include "v8/include/v8.h" | 28 #include "v8/include/v8.h" |
28 | 29 |
29 #if defined(OS_WIN) | 30 #if defined(OS_WIN) |
30 #include "content/public/renderer/render_font_warmup_win.h" | 31 #include "content/public/renderer/render_font_warmup_win.h" |
31 #include "third_party/WebKit/public/web/win/WebFontRendering.h" | 32 #include "third_party/WebKit/public/web/win/WebFontRendering.h" |
32 #include "third_party/skia/include/ports/SkFontMgr.h" | 33 #include "third_party/skia/include/ports/SkFontMgr.h" |
33 #endif | 34 #endif |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 WebKitTestRunner* test_runner = new WebKitTestRunner(render_view); | 185 WebKitTestRunner* test_runner = new WebKitTestRunner(render_view); |
185 test_runner->set_proxy(proxy); | 186 test_runner->set_proxy(proxy); |
186 if (!ShellRenderProcessObserver::GetInstance()->test_delegate()) | 187 if (!ShellRenderProcessObserver::GetInstance()->test_delegate()) |
187 ShellRenderProcessObserver::GetInstance()->SetTestDelegate(test_runner); | 188 ShellRenderProcessObserver::GetInstance()->SetTestDelegate(test_runner); |
188 proxy->SetInterfaces( | 189 proxy->SetInterfaces( |
189 ShellRenderProcessObserver::GetInstance()->test_interfaces()); | 190 ShellRenderProcessObserver::GetInstance()->test_interfaces()); |
190 test_runner->proxy()->SetDelegate( | 191 test_runner->proxy()->SetDelegate( |
191 ShellRenderProcessObserver::GetInstance()->test_delegate()); | 192 ShellRenderProcessObserver::GetInstance()->test_delegate()); |
192 } | 193 } |
193 | 194 |
| 195 bool ShellContentRendererClient::IsPluginAllowedToUseCompositorAPI( |
| 196 const GURL& url) { |
| 197 return CommandLine::ForCurrentProcess()->HasSwitch( |
| 198 switches::kEnablePepperTesting); |
| 199 } |
| 200 |
| 201 bool ShellContentRendererClient::IsPluginAllowedToUseVideoDecodeAPI( |
| 202 const GURL& url) { |
| 203 return CommandLine::ForCurrentProcess()->HasSwitch( |
| 204 switches::kEnablePepperTesting); |
| 205 } |
| 206 |
| 207 bool ShellContentRendererClient::IsPluginAllowedToUseDevChannelAPIs() { |
| 208 return CommandLine::ForCurrentProcess()->HasSwitch( |
| 209 switches::kEnablePepperTesting); |
| 210 } |
| 211 |
194 } // namespace content | 212 } // namespace content |
OLD | NEW |