Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: content/shell/renderer/shell_content_renderer_client.cc

Issue 24702003: [webcrypto] Remove the mock implementation of WebCrypto. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add ContentRendererClient Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/shell/renderer/shell_content_renderer_client.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/public/common/content_constants.h" 10 #include "content/public/common/content_constants.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 } 153 }
154 154
155 WebClipboard* ShellContentRendererClient::OverrideWebClipboard() { 155 WebClipboard* ShellContentRendererClient::OverrideWebClipboard() {
156 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) 156 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree))
157 return NULL; 157 return NULL;
158 if (!clipboard_) 158 if (!clipboard_)
159 clipboard_.reset(new MockWebClipboardImpl); 159 clipboard_.reset(new MockWebClipboardImpl);
160 return clipboard_.get(); 160 return clipboard_.get();
161 } 161 }
162 162
163 WebKit::WebCrypto* ShellContentRendererClient::OverrideWebCrypto() {
164 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree))
165 return NULL;
166 WebTestInterfaces* interfaces =
167 ShellRenderProcessObserver::GetInstance()->test_interfaces();
168 return interfaces->crypto();
169 }
170
171 WebThemeEngine* ShellContentRendererClient::OverrideThemeEngine() { 163 WebThemeEngine* ShellContentRendererClient::OverrideThemeEngine() {
172 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) 164 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree))
173 return NULL; 165 return NULL;
174 return ShellRenderProcessObserver::GetInstance()->test_interfaces() 166 return ShellRenderProcessObserver::GetInstance()->test_interfaces()
175 ->themeEngine(); 167 ->themeEngine();
176 } 168 }
177 169
178 void ShellContentRendererClient::WebTestProxyCreated(RenderView* render_view, 170 void ShellContentRendererClient::WebTestProxyCreated(RenderView* render_view,
179 WebTestProxyBase* proxy) { 171 WebTestProxyBase* proxy) {
180 WebKitTestRunner* test_runner = new WebKitTestRunner(render_view); 172 WebKitTestRunner* test_runner = new WebKitTestRunner(render_view);
(...skipping 11 matching lines...) Expand all
192 if (CommandLine::ForCurrentProcess()->HasSwitch( 184 if (CommandLine::ForCurrentProcess()->HasSwitch(
193 switches::kEnableBrowserPluginForAllViewTypes)) { 185 switches::kEnableBrowserPluginForAllViewTypes)) {
194 // Allow BrowserPlugin if forced by command line flag. This is generally 186 // Allow BrowserPlugin if forced by command line flag. This is generally
195 // true for tests. 187 // true for tests.
196 return true; 188 return true;
197 } 189 }
198 return ContentRendererClient::AllowBrowserPlugin(container); 190 return ContentRendererClient::AllowBrowserPlugin(container);
199 } 191 }
200 192
201 } // namespace content 193 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/renderer/shell_content_renderer_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698