Add new certificateProvider extension API.
[chromium-blink-merge.git] / chrome / common / chrome_content_client_ios.mm
blobbfca6134c5e1005dc3f6dc208a372e4d9751f6f3
1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/common/chrome_content_client.h"
7 #include "base/logging.h"
8 #include "base/strings/string_piece.h"
9 #include "chrome/common/url_constants.h"
10 #include "components/version_info/version_info.h"
11 #include "content/public/common/user_agent.h"
12 #include "ui/base/l10n/l10n_util.h"
13 #include "ui/base/resource/resource_bundle.h"
14 #include "url/gurl.h"
15 #include "url/url_util.h"
17 // TODO(ios): Investigate merging with chrome_content_client.cc; this would
18 // requiring either a lot of ifdefing, or spliting the file into parts.
20 void ChromeContentClient::SetActiveURL(const GURL& url) {
21   NOTIMPLEMENTED();
24 void ChromeContentClient::SetGpuInfo(const gpu::GPUInfo& gpu_info) {
25   NOTIMPLEMENTED();
28 void ChromeContentClient::AddPepperPlugins(
29     std::vector<content::PepperPluginInfo>* plugins) {
30   NOTREACHED();
33 void ChromeContentClient::AddAdditionalSchemes(
34     std::vector<url::SchemeWithType>* standard_schemes,
35     std::vector<std::string>* saveable_shemes) {
36   // No additional schemes for iOS.
39 std::string ChromeContentClient::GetProduct() const {
40   std::string product("CriOS/");
41   product += version_info::GetVersionNumber();
42   return product;
45 std::string ChromeContentClient::GetUserAgent() const {
46   std::string product = GetProduct();
47   return content::BuildUserAgentFromProduct(product);
50 base::string16 ChromeContentClient::GetLocalizedString(int message_id) const {
51   return l10n_util::GetStringUTF16(message_id);
54 base::StringPiece ChromeContentClient::GetDataResource(
55     int resource_id,
56     ui::ScaleFactor scale_factor) const {
57   return ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(
58       resource_id, scale_factor);
61 base::RefCountedStaticMemory* ChromeContentClient::GetDataResourceBytes(
62     int resource_id) const {
63   return ResourceBundle::GetSharedInstance().LoadDataResourceBytes(resource_id);
66 gfx::Image& ChromeContentClient::GetNativeImageNamed(int resource_id) const {
67   return ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id);
70 std::string ChromeContentClient::GetProcessTypeNameInEnglish(int type) {
71   DCHECK(false) << "Unknown child process type!";
72   return "Unknown";