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" | 17 #include "base/debug/crash_logging.h" |
18 #include "base/files/file_path.h" | 18 #include "base/files/file_path.h" |
19 #include "base/i18n/rtl.h" | 19 #include "base/i18n/rtl.h" |
20 #include "base/json/json_writer.h" | 20 #include "base/json/json_writer.h" |
21 #include "base/lazy_instance.h" | 21 #include "base/lazy_instance.h" |
22 #include "base/location.h" | 22 #include "base/location.h" |
23 #include "base/memory/ptr_util.h" | 23 #include "base/memory/ptr_util.h" |
24 #include "base/metrics/field_trial.h" | 24 #include "base/metrics/field_trial.h" |
25 #include "base/metrics/histogram_macros.h" | 25 #include "base/metrics/histogram_macros.h" |
| 26 #include "base/metrics/user_metrics.h" |
26 #include "base/process/kill.h" | 27 #include "base/process/kill.h" |
27 #include "base/process/process.h" | 28 #include "base/process/process.h" |
28 #include "base/single_thread_task_runner.h" | 29 #include "base/single_thread_task_runner.h" |
29 #include "base/strings/string_number_conversions.h" | 30 #include "base/strings/string_number_conversions.h" |
30 #include "base/strings/string_piece.h" | 31 #include "base/strings/string_piece.h" |
31 #include "base/strings/string_split.h" | 32 #include "base/strings/string_split.h" |
32 #include "base/strings/string_util.h" | 33 #include "base/strings/string_util.h" |
33 #include "base/strings/sys_string_conversions.h" | 34 #include "base/strings/sys_string_conversions.h" |
34 #include "base/strings/utf_string_conversions.h" | 35 #include "base/strings/utf_string_conversions.h" |
35 #include "base/sys_info.h" | 36 #include "base/sys_info.h" |
(...skipping 2765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2801 void RenderViewImpl::LaunchAndroidContentIntent(const GURL& intent, | 2802 void RenderViewImpl::LaunchAndroidContentIntent(const GURL& intent, |
2802 size_t request_id, | 2803 size_t request_id, |
2803 bool is_main_frame) { | 2804 bool is_main_frame) { |
2804 if (request_id != expected_content_intent_id_) | 2805 if (request_id != expected_content_intent_id_) |
2805 return; | 2806 return; |
2806 | 2807 |
2807 // Remove the content highlighting if any. | 2808 // Remove the content highlighting if any. |
2808 ScheduleComposite(); | 2809 ScheduleComposite(); |
2809 | 2810 |
2810 if (!intent.is_empty()) { | 2811 if (!intent.is_empty()) { |
| 2812 base::RecordAction(base::UserMetricsAction( |
| 2813 "Android.ContentDetectorActivated")); |
2811 Send(new ViewHostMsg_StartContentIntent(GetRoutingID(), intent, | 2814 Send(new ViewHostMsg_StartContentIntent(GetRoutingID(), intent, |
2812 is_main_frame)); | 2815 is_main_frame)); |
2813 } | 2816 } |
2814 } | 2817 } |
2815 | 2818 |
2816 bool RenderViewImpl::openDateTimeChooser( | 2819 bool RenderViewImpl::openDateTimeChooser( |
2817 const blink::WebDateTimeChooserParams& params, | 2820 const blink::WebDateTimeChooserParams& params, |
2818 blink::WebDateTimeChooserCompletion* completion) { | 2821 blink::WebDateTimeChooserCompletion* completion) { |
2819 // JavaScript may try to open a date time chooser while one is already open. | 2822 // JavaScript may try to open a date time chooser while one is already open. |
2820 if (date_time_picker_client_) | 2823 if (date_time_picker_client_) |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3026 if (IsUseZoomForDSFEnabled()) { | 3029 if (IsUseZoomForDSFEnabled()) { |
3027 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); | 3030 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); |
3028 } else { | 3031 } else { |
3029 webview()->setDeviceScaleFactor(device_scale_factor_); | 3032 webview()->setDeviceScaleFactor(device_scale_factor_); |
3030 } | 3033 } |
3031 webview()->settings()->setPreferCompositingToLCDTextEnabled( | 3034 webview()->settings()->setPreferCompositingToLCDTextEnabled( |
3032 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); | 3035 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); |
3033 } | 3036 } |
3034 | 3037 |
3035 } // namespace content | 3038 } // namespace content |
OLD | NEW |