Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(140)

Side by Side Diff: chrome/common/chrome_content_client_ios.mm

Issue 11418005: Get a minimal unit_tests target building and running for iOS (Closed) Base URL: http://git.chromium.org/chromium/src.git@chrome-gyp-ios-support
Patch Set: Better ifdefing in chrome_paths Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | chrome/common/chrome_paths.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #include "chrome/common/chrome_content_client.h"
6
7 #include "base/logging.h"
8 #include "base/string_piece.h"
9 #include "chrome/common/chrome_version_info.h"
10 #include "chrome/common/url_constants.h"
11 #include "googleurl/src/gurl.h"
12 #include "ui/base/l10n/l10n_util.h"
13 #include "ui/base/resource/resource_bundle.h"
14 #include "webkit/user_agent/user_agent_util.h"
15
16 // TODO(ios): Investigate merging with chrome_content_client.cc; this would
17 // requiring either a lot of ifdefing, or spliting the file into parts.
18
19 namespace chrome {
20
21 void ChromeContentClient::SetActiveURL(const GURL& url) {
22 NOTIMPLEMENTED();
23 }
24
25 void ChromeContentClient::SetGpuInfo(const content::GPUInfo& gpu_info) {
26 NOTIMPLEMENTED();
27 }
28
29 void ChromeContentClient::AddPepperPlugins(
30 std::vector<content::PepperPluginInfo>* plugins) {
31 NOTREACHED();
32 }
33
34 void ChromeContentClient::AddNPAPIPlugins(
35 webkit::npapi::PluginList* plugin_list) {
36 NOTREACHED();
37 }
38
39 void ChromeContentClient::AddAdditionalSchemes(
40 std::vector<std::string>* standard_schemes,
41 std::vector<std::string>* saveable_shemes) {
42 // No additional schemes for iOS.
43 }
44
45 bool ChromeContentClient::HasWebUIScheme(const GURL& url) const {
46 return url.SchemeIs(chrome::kChromeUIScheme);
47 }
48
49 bool ChromeContentClient::CanHandleWhileSwappedOut(
50 const IPC::Message& msg) {
51 NOTIMPLEMENTED();
52 return false;
53 }
54
55 std::string ChromeContentClient::GetProduct() const {
56 chrome::VersionInfo version_info;
57 std::string product("CriOS/");
58 product += version_info.is_valid() ? version_info.Version() : "0.0.0.0";
59 return product;
60 }
61
62 std::string ChromeContentClient::GetUserAgent() const {
63 std::string product = GetProduct();
64 return webkit_glue::BuildUserAgentFromProduct(product);
65 }
66
67 string16 ChromeContentClient::GetLocalizedString(int message_id) const {
68 return l10n_util::GetStringUTF16(message_id);
69 }
70
71 base::StringPiece ChromeContentClient::GetDataResource(
72 int resource_id,
73 ui::ScaleFactor scale_factor) const {
74 return ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(
75 resource_id, scale_factor);
76 }
77
78 gfx::Image& ChromeContentClient::GetNativeImageNamed(int resource_id) const {
79 return ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id);
80 }
81
82 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | chrome/common/chrome_paths.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698