| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "apps/shell/app_shell_content_client.h" | 5 #include "apps/shell/shell_content_client.h" |
| 6 | 6 |
| 7 #include "base/strings/string_piece.h" | 7 #include "base/strings/string_piece.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "ui/base/l10n/l10n_util.h" | 9 #include "ui/base/l10n/l10n_util.h" |
| 10 #include "ui/base/resource/resource_bundle.h" | 10 #include "ui/base/resource/resource_bundle.h" |
| 11 #include "webkit/common/user_agent/user_agent_util.h" | 11 #include "webkit/common/user_agent/user_agent_util.h" |
| 12 | 12 |
| 13 namespace apps { | 13 namespace apps { |
| 14 | 14 |
| 15 AppShellContentClient::AppShellContentClient() {} | 15 ShellContentClient::ShellContentClient() {} |
| 16 | 16 |
| 17 AppShellContentClient::~AppShellContentClient() {} | 17 ShellContentClient::~ShellContentClient() {} |
| 18 | 18 |
| 19 std::string AppShellContentClient::GetUserAgent() const { | 19 std::string ShellContentClient::GetUserAgent() const { |
| 20 // TODO(derat): Figure out what this should be for app_shell and determine | 20 // TODO(derat): Figure out what this should be for app_shell and determine |
| 21 // whether we need to include a version number to placate browser sniffing. | 21 // whether we need to include a version number to placate browser sniffing. |
| 22 return webkit_glue::BuildUserAgentFromProduct("Chrome"); | 22 return webkit_glue::BuildUserAgentFromProduct("Chrome"); |
| 23 } | 23 } |
| 24 | 24 |
| 25 string16 AppShellContentClient::GetLocalizedString(int message_id) const { | 25 string16 ShellContentClient::GetLocalizedString(int message_id) const { |
| 26 return l10n_util::GetStringUTF16(message_id); | 26 return l10n_util::GetStringUTF16(message_id); |
| 27 } | 27 } |
| 28 | 28 |
| 29 base::StringPiece AppShellContentClient::GetDataResource( | 29 base::StringPiece ShellContentClient::GetDataResource( |
| 30 int resource_id, | 30 int resource_id, |
| 31 ui::ScaleFactor scale_factor) const { | 31 ui::ScaleFactor scale_factor) const { |
| 32 return ResourceBundle::GetSharedInstance().GetRawDataResourceForScale( | 32 return ResourceBundle::GetSharedInstance().GetRawDataResourceForScale( |
| 33 resource_id, scale_factor); | 33 resource_id, scale_factor); |
| 34 } | 34 } |
| 35 | 35 |
| 36 base::RefCountedStaticMemory* AppShellContentClient::GetDataResourceBytes( | 36 base::RefCountedStaticMemory* ShellContentClient::GetDataResourceBytes( |
| 37 int resource_id) const { | 37 int resource_id) const { |
| 38 return ResourceBundle::GetSharedInstance().LoadDataResourceBytes(resource_id); | 38 return ResourceBundle::GetSharedInstance().LoadDataResourceBytes(resource_id); |
| 39 } | 39 } |
| 40 | 40 |
| 41 gfx::Image& AppShellContentClient::GetNativeImageNamed(int resource_id) const { | 41 gfx::Image& ShellContentClient::GetNativeImageNamed(int resource_id) const { |
| 42 return ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id); | 42 return ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id); |
| 43 } | 43 } |
| 44 | 44 |
| 45 } // namespace apps | 45 } // namespace apps |
| OLD | NEW |