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/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
11 #include "base/auto_reset.h" | 11 #include "base/auto_reset.h" |
12 #include "base/bind.h" | 12 #include "base/bind.h" |
13 #include "base/bind_helpers.h" | 13 #include "base/bind_helpers.h" |
14 #include "base/command_line.h" | 14 #include "base/command_line.h" |
15 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
16 #include "base/debug/alias.h" | 16 #include "base/debug/alias.h" |
17 #include "base/debug/crash_logging.h" | |
18 #include "base/files/file_path.h" | 17 #include "base/files/file_path.h" |
19 #include "base/i18n/rtl.h" | 18 #include "base/i18n/rtl.h" |
20 #include "base/json/json_writer.h" | 19 #include "base/json/json_writer.h" |
21 #include "base/lazy_instance.h" | 20 #include "base/lazy_instance.h" |
22 #include "base/location.h" | 21 #include "base/location.h" |
23 #include "base/memory/ptr_util.h" | 22 #include "base/memory/ptr_util.h" |
24 #include "base/metrics/field_trial.h" | 23 #include "base/metrics/field_trial.h" |
25 #include "base/metrics/histogram_macros.h" | 24 #include "base/metrics/histogram_macros.h" |
26 #include "base/process/kill.h" | 25 #include "base/process/kill.h" |
27 #include "base/process/process.h" | 26 #include "base/process/process.h" |
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
590 | 589 |
591 g_view_map.Get().insert(std::make_pair(webview(), this)); | 590 g_view_map.Get().insert(std::make_pair(webview(), this)); |
592 g_routing_id_view_map.Get().insert(std::make_pair(GetRoutingID(), this)); | 591 g_routing_id_view_map.Get().insert(std::make_pair(GetRoutingID(), this)); |
593 | 592 |
594 const base::CommandLine& command_line = | 593 const base::CommandLine& command_line = |
595 *base::CommandLine::ForCurrentProcess(); | 594 *base::CommandLine::ForCurrentProcess(); |
596 | 595 |
597 if (command_line.HasSwitch(switches::kStatsCollectionController)) | 596 if (command_line.HasSwitch(switches::kStatsCollectionController)) |
598 stats_collection_observer_.reset(new StatsCollectionObserver(this)); | 597 stats_collection_observer_.reset(new StatsCollectionObserver(this)); |
599 | 598 |
600 // Debug cases of https://crbug.com/575245. | |
601 base::debug::SetCrashKeyValue("rvinit_view_id", | |
alexmos
2016/12/13 20:28:55
I'll mention that there was some value in looking
Charlie Reis
2017/05/09 16:42:26
Fair point, but I think it's worth trying to clean
| |
602 base::IntToString(GetRoutingID())); | |
603 base::debug::SetCrashKeyValue("rvinit_proxy_id", | |
604 base::IntToString(params.proxy_routing_id)); | |
605 base::debug::SetCrashKeyValue( | |
606 "rvinit_main_frame_id", base::IntToString(params.main_frame_routing_id)); | |
607 | |
608 webview()->setDisplayMode(display_mode_); | 599 webview()->setDisplayMode(display_mode_); |
609 webview()->settings()->setPreferCompositingToLCDTextEnabled( | 600 webview()->settings()->setPreferCompositingToLCDTextEnabled( |
610 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); | 601 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); |
611 webview()->settings()->setThreadedScrollingEnabled( | 602 webview()->settings()->setThreadedScrollingEnabled( |
612 !command_line.HasSwitch(switches::kDisableThreadedScrolling)); | 603 !command_line.HasSwitch(switches::kDisableThreadedScrolling)); |
613 webview()->setShowFPSCounter( | 604 webview()->setShowFPSCounter( |
614 command_line.HasSwitch(cc::switches::kShowFPSCounter)); | 605 command_line.HasSwitch(cc::switches::kShowFPSCounter)); |
615 | 606 |
616 if (auto overridden_color_profile = | 607 if (auto overridden_color_profile = |
617 GetContentClient()->renderer()->GetImageDecodeColorProfile()) { | 608 GetContentClient()->renderer()->GetImageDecodeColorProfile()) { |
(...skipping 2201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2819 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); | 2810 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); |
2820 } | 2811 } |
2821 | 2812 |
2822 std::unique_ptr<InputEventAck> ack( | 2813 std::unique_ptr<InputEventAck> ack( |
2823 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type, | 2814 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type, |
2824 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); | 2815 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); |
2825 OnInputEventAck(std::move(ack)); | 2816 OnInputEventAck(std::move(ack)); |
2826 } | 2817 } |
2827 | 2818 |
2828 } // namespace content | 2819 } // namespace content |
OLD | NEW |