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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | chrome/common/chrome_paths.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/chrome_content_client_ios.mm
diff --git a/chrome/common/chrome_content_client_ios.mm b/chrome/common/chrome_content_client_ios.mm
new file mode 100644
index 0000000000000000000000000000000000000000..c8b086ed986cd3e5e0e977ee8c75ba54a9a481e1
--- /dev/null
+++ b/chrome/common/chrome_content_client_ios.mm
@@ -0,0 +1,82 @@
+// Copyright 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/common/chrome_content_client.h"
+
+#include "base/logging.h"
+#include "base/string_piece.h"
+#include "chrome/common/chrome_version_info.h"
+#include "chrome/common/url_constants.h"
+#include "googleurl/src/gurl.h"
+#include "ui/base/l10n/l10n_util.h"
+#include "ui/base/resource/resource_bundle.h"
+#include "webkit/user_agent/user_agent_util.h"
+
+// TODO(ios): Investigate merging with chrome_content_client.cc; this would
+// requiring either a lot of ifdefing, or spliting the file into parts.
+
+namespace chrome {
+
+void ChromeContentClient::SetActiveURL(const GURL& url) {
+ NOTIMPLEMENTED();
+}
+
+void ChromeContentClient::SetGpuInfo(const content::GPUInfo& gpu_info) {
+ NOTIMPLEMENTED();
+}
+
+void ChromeContentClient::AddPepperPlugins(
+ std::vector<content::PepperPluginInfo>* plugins) {
+ NOTREACHED();
+}
+
+void ChromeContentClient::AddNPAPIPlugins(
+ webkit::npapi::PluginList* plugin_list) {
+ NOTREACHED();
+}
+
+void ChromeContentClient::AddAdditionalSchemes(
+ std::vector<std::string>* standard_schemes,
+ std::vector<std::string>* saveable_shemes) {
+ // No additional schemes for iOS.
+}
+
+bool ChromeContentClient::HasWebUIScheme(const GURL& url) const {
+ return url.SchemeIs(chrome::kChromeUIScheme);
+}
+
+bool ChromeContentClient::CanHandleWhileSwappedOut(
+ const IPC::Message& msg) {
+ NOTIMPLEMENTED();
+ return false;
+}
+
+std::string ChromeContentClient::GetProduct() const {
+ chrome::VersionInfo version_info;
+ std::string product("CriOS/");
+ product += version_info.is_valid() ? version_info.Version() : "0.0.0.0";
+ return product;
+}
+
+std::string ChromeContentClient::GetUserAgent() const {
+ std::string product = GetProduct();
+ return webkit_glue::BuildUserAgentFromProduct(product);
+}
+
+string16 ChromeContentClient::GetLocalizedString(int message_id) const {
+ return l10n_util::GetStringUTF16(message_id);
+}
+
+base::StringPiece ChromeContentClient::GetDataResource(
+ int resource_id,
+ ui::ScaleFactor scale_factor) const {
+ return ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(
+ resource_id, scale_factor);
+}
+
+gfx::Image& ChromeContentClient::GetNativeImageNamed(int resource_id) const {
+ return ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id);
+}
+
+} // namespace chrome
« 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