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_client_android.h" | 7 #include "android_webview/common/aw_media_client_android.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" | |
18 #include "ipc/ipc_message.h" | 17 #include "ipc/ipc_message.h" |
19 #include "ui/base/l10n/l10n_util.h" | 18 #include "ui/base/l10n/l10n_util.h" |
20 #include "ui/base/resource/resource_bundle.h" | 19 #include "ui/base/resource/resource_bundle.h" |
21 | 20 |
22 namespace android_webview { | 21 namespace android_webview { |
23 | 22 |
24 std::string GetProduct() { | 23 std::string GetProduct() { |
25 return "Chrome/" PRODUCT_VERSION; | 24 return "Chrome/" PRODUCT_VERSION; |
26 } | 25 } |
27 | 26 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 // Because of this we should never drop any synchronous IPC replies. | 76 // Because of this we should never drop any synchronous IPC replies. |
78 return message->type() == IPC_REPLY_ID; | 77 return message->type() == IPC_REPLY_ID; |
79 } | 78 } |
80 | 79 |
81 void AwContentClient::SetGpuInfo(const gpu::GPUInfo& gpu_info) { | 80 void AwContentClient::SetGpuInfo(const gpu::GPUInfo& gpu_info) { |
82 gpu_fingerprint_ = gpu_info.gl_version + '|' + gpu_info.gl_vendor + '|' + | 81 gpu_fingerprint_ = gpu_info.gl_version + '|' + gpu_info.gl_vendor + '|' + |
83 gpu_info.gl_renderer; | 82 gpu_info.gl_renderer; |
84 std::replace_if(gpu_fingerprint_.begin(), gpu_fingerprint_.end(), | 83 std::replace_if(gpu_fingerprint_.begin(), gpu_fingerprint_.end(), |
85 [](char c) { return !::isprint(c); }, '_'); | 84 [](char c) { return !::isprint(c); }, '_'); |
86 | 85 |
87 gpu::SetKeysForCrashLogging(gpu_info); | 86 base::debug::SetCrashKeyValue(crash_keys::kGPUDriverVersion, |
| 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); |
88 } | 94 } |
89 | 95 |
90 bool AwContentClient::UsingSynchronousCompositing() { | 96 bool AwContentClient::UsingSynchronousCompositing() { |
91 return true; | 97 return true; |
92 } | 98 } |
93 | 99 |
94 media::MediaClientAndroid* AwContentClient::GetMediaClientAndroid() { | 100 media::MediaClientAndroid* AwContentClient::GetMediaClientAndroid() { |
95 return new AwMediaClientAndroid(AwResource::GetConfigKeySystemUuidMapping()); | 101 return new AwMediaClientAndroid(AwResource::GetConfigKeySystemUuidMapping()); |
96 } | 102 } |
97 | 103 |
98 } // namespace android_webview | 104 } // namespace android_webview |
OLD | NEW |