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 "android_webview/common/aw_content_client.h" | 5 #include "android_webview/common/aw_content_client.h" |
6 | 6 |
7 #include "android_webview/common/aw_media_drm_bridge_client.h" | 7 #include "android_webview/common/aw_media_drm_bridge_client.h" |
8 #include "android_webview/common/aw_resource.h" | 8 #include "android_webview/common/aw_resource.h" |
9 #include "android_webview/common/aw_version_info_values.h" | 9 #include "android_webview/common/aw_version_info_values.h" |
10 #include "android_webview/common/crash_reporter/crash_keys.h" | 10 #include "android_webview/common/crash_reporter/crash_keys.h" |
11 #include "android_webview/common/url_constants.h" | 11 #include "android_webview/common/url_constants.h" |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
13 #include "base/debug/crash_logging.h" | 13 #include "base/debug/crash_logging.h" |
14 #include "content/public/common/content_switches.h" | 14 #include "content/public/common/content_switches.h" |
15 #include "content/public/common/user_agent.h" | 15 #include "content/public/common/user_agent.h" |
16 #include "gpu/config/gpu_info.h" | 16 #include "gpu/config/gpu_info.h" |
| 17 #include "gpu/config/gpu_util.h" |
17 #include "ipc/ipc_message.h" | 18 #include "ipc/ipc_message.h" |
18 #include "ui/base/l10n/l10n_util.h" | 19 #include "ui/base/l10n/l10n_util.h" |
19 #include "ui/base/resource/resource_bundle.h" | 20 #include "ui/base/resource/resource_bundle.h" |
20 | 21 |
21 namespace android_webview { | 22 namespace android_webview { |
22 | 23 |
23 std::string GetProduct() { | 24 std::string GetProduct() { |
24 return "Chrome/" PRODUCT_VERSION; | 25 return "Chrome/" PRODUCT_VERSION; |
25 } | 26 } |
26 | 27 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 // Because of this we should never drop any synchronous IPC replies. | 77 // Because of this we should never drop any synchronous IPC replies. |
77 return message->type() == IPC_REPLY_ID; | 78 return message->type() == IPC_REPLY_ID; |
78 } | 79 } |
79 | 80 |
80 void AwContentClient::SetGpuInfo(const gpu::GPUInfo& gpu_info) { | 81 void AwContentClient::SetGpuInfo(const gpu::GPUInfo& gpu_info) { |
81 gpu_fingerprint_ = gpu_info.gl_version + '|' + gpu_info.gl_vendor + '|' + | 82 gpu_fingerprint_ = gpu_info.gl_version + '|' + gpu_info.gl_vendor + '|' + |
82 gpu_info.gl_renderer; | 83 gpu_info.gl_renderer; |
83 std::replace_if(gpu_fingerprint_.begin(), gpu_fingerprint_.end(), | 84 std::replace_if(gpu_fingerprint_.begin(), gpu_fingerprint_.end(), |
84 [](char c) { return !::isprint(c); }, '_'); | 85 [](char c) { return !::isprint(c); }, '_'); |
85 | 86 |
86 base::debug::SetCrashKeyValue(crash_keys::kGPUDriverVersion, | 87 gpu::SetKeysForCrashLogging(gpu_info); |
87 gpu_info.driver_version); | |
88 base::debug::SetCrashKeyValue(crash_keys::kGPUPixelShaderVersion, | |
89 gpu_info.pixel_shader_version); | |
90 base::debug::SetCrashKeyValue(crash_keys::kGPUVertexShaderVersion, | |
91 gpu_info.vertex_shader_version); | |
92 base::debug::SetCrashKeyValue(crash_keys::kGPUVendor, gpu_info.gl_vendor); | |
93 base::debug::SetCrashKeyValue(crash_keys::kGPURenderer, gpu_info.gl_renderer); | |
94 } | 88 } |
95 | 89 |
96 bool AwContentClient::UsingSynchronousCompositing() { | 90 bool AwContentClient::UsingSynchronousCompositing() { |
97 return true; | 91 return true; |
98 } | 92 } |
99 | 93 |
100 media::MediaDrmBridgeClient* AwContentClient::GetMediaDrmBridgeClient() { | 94 media::MediaDrmBridgeClient* AwContentClient::GetMediaDrmBridgeClient() { |
101 return new AwMediaDrmBridgeClient( | 95 return new AwMediaDrmBridgeClient( |
102 AwResource::GetConfigKeySystemUuidMapping()); | 96 AwResource::GetConfigKeySystemUuidMapping()); |
103 } | 97 } |
104 | 98 |
105 } // namespace android_webview | 99 } // namespace android_webview |
OLD | NEW |