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

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

Issue 1683583002: Report user actions when gesture starts and stops in user_model. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/render_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <utility> 10 #include <utility>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/allocator/allocator_extension.h" 13 #include "base/allocator/allocator_extension.h"
14 #include "base/command_line.h" 14 #include "base/command_line.h"
15 #include "base/debug/crash_logging.h" 15 #include "base/debug/crash_logging.h"
16 #include "base/lazy_instance.h" 16 #include "base/lazy_instance.h"
17 #include "base/location.h" 17 #include "base/location.h"
18 #include "base/logging.h" 18 #include "base/logging.h"
19 #include "base/macros.h" 19 #include "base/macros.h"
20 #include "base/memory/discardable_memory_allocator.h" 20 #include "base/memory/discardable_memory_allocator.h"
21 #include "base/memory/shared_memory.h" 21 #include "base/memory/shared_memory.h"
22 #include "base/metrics/field_trial.h" 22 #include "base/metrics/field_trial.h"
23 #include "base/metrics/histogram.h" 23 #include "base/metrics/histogram.h"
24 #include "base/metrics/user_metrics.h"
24 #include "base/path_service.h" 25 #include "base/path_service.h"
25 #include "base/single_thread_task_runner.h" 26 #include "base/single_thread_task_runner.h"
26 #include "base/strings/string16.h" 27 #include "base/strings/string16.h"
27 #include "base/strings/string_number_conversions.h" 28 #include "base/strings/string_number_conversions.h"
28 #include "base/strings/string_split.h" 29 #include "base/strings/string_split.h"
29 #include "base/strings/string_tokenizer.h" 30 #include "base/strings/string_tokenizer.h"
30 #include "base/strings/sys_string_conversions.h" 31 #include "base/strings/sys_string_conversions.h"
31 #include "base/strings/utf_string_conversions.h" 32 #include "base/strings/utf_string_conversions.h"
32 #include "base/thread_task_runner_handle.h" 33 #include "base/thread_task_runner_handle.h"
33 #include "base/threading/simple_thread.h" 34 #include "base/threading/simple_thread.h"
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 .Build()), 629 .Build()),
629 renderer_scheduler_(std::move(scheduler)), 630 renderer_scheduler_(std::move(scheduler)),
630 main_message_loop_(std::move(main_message_loop)), 631 main_message_loop_(std::move(main_message_loop)),
631 raster_worker_pool_(new RasterWorkerPool()) { 632 raster_worker_pool_(new RasterWorkerPool()) {
632 Init(); 633 Init();
633 } 634 }
634 635
635 void RenderThreadImpl::Init() { 636 void RenderThreadImpl::Init() {
636 TRACE_EVENT0("startup", "RenderThreadImpl::Init"); 637 TRACE_EVENT0("startup", "RenderThreadImpl::Init");
637 638
639 base::AddActionCallback(base::Bind(&RenderThreadImpl::RecordComputedAction,
640 base::Unretained(this)));
Ilya Sherman 2016/02/09 22:03:25 Should the callback be removed in the destructor o
beaudoin 2016/02/11 22:03:28 Done.
641
638 base::trace_event::TraceLog::GetInstance()->SetThreadSortIndex( 642 base::trace_event::TraceLog::GetInstance()->SetThreadSortIndex(
639 base::PlatformThread::CurrentId(), 643 base::PlatformThread::CurrentId(),
640 kTraceEventRendererMainThreadSortIndex); 644 kTraceEventRendererMainThreadSortIndex);
641 645
642 #if defined(OS_MACOSX) || (defined(OS_ANDROID) && !defined(USE_AURA)) 646 #if defined(OS_MACOSX) || (defined(OS_ANDROID) && !defined(USE_AURA))
643 // On Mac and Android Java UI, the select popups are rendered by the browser. 647 // On Mac and Android Java UI, the select popups are rendered by the browser.
644 blink::WebView::setUseExternalPopupMenus(true); 648 blink::WebView::setUseExternalPopupMenus(true);
645 #endif 649 #endif
646 650
647 lazy_tls.Pointer()->Set(this); 651 lazy_tls.Pointer()->Set(this);
(...skipping 1497 matching lines...) Expand 10 before | Expand all | Expand 10 after
2145 } 2149 }
2146 2150
2147 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { 2151 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() {
2148 size_t erased = 2152 size_t erased =
2149 RenderThreadImpl::current()->pending_render_frame_connects_.erase( 2153 RenderThreadImpl::current()->pending_render_frame_connects_.erase(
2150 routing_id_); 2154 routing_id_);
2151 DCHECK_EQ(1u, erased); 2155 DCHECK_EQ(1u, erased);
2152 } 2156 }
2153 2157
2154 } // namespace content 2158 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698