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

Side by Side Diff: content/renderer/renderer_blink_platform_impl.cc

Issue 1447563002: Implement frame attribution (FrameBlamer) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: It builds => ship it. Created 4 years, 9 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
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/renderer/renderer_blink_platform_impl.h" 5 #include "content/renderer/renderer_blink_platform_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 : BlinkPlatformImpl(renderer_scheduler->DefaultTaskRunner()), 245 : BlinkPlatformImpl(renderer_scheduler->DefaultTaskRunner()),
246 main_thread_(renderer_scheduler->CreateMainThread()), 246 main_thread_(renderer_scheduler->CreateMainThread()),
247 clipboard_delegate_(new RendererClipboardDelegate), 247 clipboard_delegate_(new RendererClipboardDelegate),
248 clipboard_(new WebClipboardImpl(clipboard_delegate_.get())), 248 clipboard_(new WebClipboardImpl(clipboard_delegate_.get())),
249 mime_registry_(new RendererBlinkPlatformImpl::MimeRegistry), 249 mime_registry_(new RendererBlinkPlatformImpl::MimeRegistry),
250 sudden_termination_disables_(0), 250 sudden_termination_disables_(0),
251 plugin_refresh_allowed_(true), 251 plugin_refresh_allowed_(true),
252 default_task_runner_(renderer_scheduler->DefaultTaskRunner()), 252 default_task_runner_(renderer_scheduler->DefaultTaskRunner()),
253 loading_task_runner_(renderer_scheduler->LoadingTaskRunner()), 253 loading_task_runner_(renderer_scheduler->LoadingTaskRunner()),
254 web_scrollbar_behavior_(new WebScrollbarBehaviorImpl), 254 web_scrollbar_behavior_(new WebScrollbarBehaviorImpl),
255 renderer_scheduler_(renderer_scheduler) { 255 renderer_scheduler_(renderer_scheduler),
256 web_blame_context_(new WebBlameContextImpl(
257 RenderThreadImpl::current()->blame_context())) {
256 #if !defined(OS_ANDROID) && !defined(OS_WIN) 258 #if !defined(OS_ANDROID) && !defined(OS_WIN)
257 if (g_sandbox_enabled && sandboxEnabled()) { 259 if (g_sandbox_enabled && sandboxEnabled()) {
258 sandbox_support_.reset(new RendererBlinkPlatformImpl::SandboxSupport); 260 sandbox_support_.reset(new RendererBlinkPlatformImpl::SandboxSupport);
259 } else { 261 } else {
260 DVLOG(1) << "Disabling sandbox support for testing."; 262 DVLOG(1) << "Disabling sandbox support for testing.";
261 } 263 }
262 #endif 264 #endif
263 265
264 // ChildThread may not exist in some tests. 266 // ChildThread may not exist in some tests.
265 if (ChildThreadImpl::current()) { 267 if (ChildThreadImpl::current()) {
(...skipping 30 matching lines...) Expand all
296 child_thread ? child_thread->resource_dispatcher() : NULL, 298 child_thread ? child_thread->resource_dispatcher() : NULL,
297 make_scoped_ptr(currentThread()->taskRunner()->clone())); 299 make_scoped_ptr(currentThread()->taskRunner()->clone()));
298 } 300 }
299 301
300 blink::WebThread* RendererBlinkPlatformImpl::currentThread() { 302 blink::WebThread* RendererBlinkPlatformImpl::currentThread() {
301 if (main_thread_->isCurrentThread()) 303 if (main_thread_->isCurrentThread())
302 return main_thread_.get(); 304 return main_thread_.get();
303 return BlinkPlatformImpl::currentThread(); 305 return BlinkPlatformImpl::currentThread();
304 } 306 }
305 307
308 blink::WebBlameContext* RendererBlinkPlatformImpl::threadBlameContext() {
309 if (!main_thread_->isCurrentThread())
310 return nullptr;
311 return web_blame_context_.get();
312 }
313
306 blink::WebClipboard* RendererBlinkPlatformImpl::clipboard() { 314 blink::WebClipboard* RendererBlinkPlatformImpl::clipboard() {
307 blink::WebClipboard* clipboard = 315 blink::WebClipboard* clipboard =
308 GetContentClient()->renderer()->OverrideWebClipboard(); 316 GetContentClient()->renderer()->OverrideWebClipboard();
309 if (clipboard) 317 if (clipboard)
310 return clipboard; 318 return clipboard;
311 return clipboard_.get(); 319 return clipboard_.get();
312 } 320 }
313 321
314 blink::WebMimeRegistry* RendererBlinkPlatformImpl::mimeRegistry() { 322 blink::WebMimeRegistry* RendererBlinkPlatformImpl::mimeRegistry() {
315 return mime_registry_.get(); 323 return mime_registry_.get();
(...skipping 961 matching lines...) Expand 10 before | Expand all | Expand 10 after
1277 } 1285 }
1278 1286
1279 //------------------------------------------------------------------------------ 1287 //------------------------------------------------------------------------------
1280 1288
1281 blink::WebTrialTokenValidator* 1289 blink::WebTrialTokenValidator*
1282 RendererBlinkPlatformImpl::trialTokenValidator() { 1290 RendererBlinkPlatformImpl::trialTokenValidator() {
1283 return &trial_token_validator_; 1291 return &trial_token_validator_;
1284 } 1292 }
1285 1293
1286 } // namespace content 1294 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698