| 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/url_constants.h" |
| 10 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 11 #include "content/public/common/content_switches.h" | 12 #include "content/public/common/content_switches.h" |
| 12 #include "content/public/common/user_agent.h" | 13 #include "content/public/common/user_agent.h" |
| 13 #include "gpu/config/gpu_info.h" | 14 #include "gpu/config/gpu_info.h" |
| 14 #include "ipc/ipc_message.h" | 15 #include "ipc/ipc_message.h" |
| 15 #include "ui/base/l10n/l10n_util.h" | 16 #include "ui/base/l10n/l10n_util.h" |
| 16 #include "ui/base/resource/resource_bundle.h" | 17 #include "ui/base/resource/resource_bundle.h" |
| 17 | 18 |
| 18 namespace android_webview { | 19 namespace android_webview { |
| 19 | 20 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 30 } | 31 } |
| 31 return content::BuildUserAgentFromProductAndExtraOSInfo( | 32 return content::BuildUserAgentFromProductAndExtraOSInfo( |
| 32 product, | 33 product, |
| 33 GetExtraOSUserAgentInfo()); | 34 GetExtraOSUserAgentInfo()); |
| 34 } | 35 } |
| 35 | 36 |
| 36 std::string GetExtraOSUserAgentInfo() { | 37 std::string GetExtraOSUserAgentInfo() { |
| 37 return "; wv"; | 38 return "; wv"; |
| 38 } | 39 } |
| 39 | 40 |
| 41 void AwContentClient::AddAdditionalSchemes(Schemes* schemes) { |
| 42 schemes->local_schemes.push_back(url::kContentScheme); |
| 43 schemes->secure_schemes.push_back( |
| 44 android_webview::kAndroidWebViewVideoPosterScheme); |
| 45 } |
| 46 |
| 40 std::string AwContentClient::GetProduct() const { | 47 std::string AwContentClient::GetProduct() const { |
| 41 return android_webview::GetProduct(); | 48 return android_webview::GetProduct(); |
| 42 } | 49 } |
| 43 | 50 |
| 44 std::string AwContentClient::GetUserAgent() const { | 51 std::string AwContentClient::GetUserAgent() const { |
| 45 return android_webview::GetUserAgent(); | 52 return android_webview::GetUserAgent(); |
| 46 } | 53 } |
| 47 | 54 |
| 48 base::string16 AwContentClient::GetLocalizedString(int message_id) const { | 55 base::string16 AwContentClient::GetLocalizedString(int message_id) const { |
| 49 // TODO(boliu): Used only by WebKit, so only bundle those resources for | 56 // TODO(boliu): Used only by WebKit, so only bundle those resources for |
| (...skipping 27 matching lines...) Expand all Loading... |
| 77 | 84 |
| 78 bool AwContentClient::UsingSynchronousCompositing() { | 85 bool AwContentClient::UsingSynchronousCompositing() { |
| 79 return true; | 86 return true; |
| 80 } | 87 } |
| 81 | 88 |
| 82 media::MediaClientAndroid* AwContentClient::GetMediaClientAndroid() { | 89 media::MediaClientAndroid* AwContentClient::GetMediaClientAndroid() { |
| 83 return new AwMediaClientAndroid(AwResource::GetConfigKeySystemUuidMapping()); | 90 return new AwMediaClientAndroid(AwResource::GetConfigKeySystemUuidMapping()); |
| 84 } | 91 } |
| 85 | 92 |
| 86 } // namespace android_webview | 93 } // namespace android_webview |
| OLD | NEW |