| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 "blimp/engine/common/blimp_content_client.h" | 5 #include "blimp/engine/common/blimp_content_client.h" |
| 6 | 6 |
| 7 #include "ui/base/l10n/l10n_util.h" | 7 #include "ui/base/l10n/l10n_util.h" |
| 8 #include "ui/base/resource/resource_bundle.h" | 8 #include "ui/base/resource/resource_bundle.h" |
| 9 | 9 |
| 10 namespace blimp { | 10 namespace blimp { |
| 11 namespace engine { | 11 namespace engine { |
| 12 | 12 |
| 13 BlimpContentClient::~BlimpContentClient() {} | 13 BlimpContentClient::~BlimpContentClient() {} |
| 14 | 14 |
| 15 std::string BlimpContentClient::GetUserAgent() const { | 15 std::string BlimpContentClient::GetUserAgent() const { |
| 16 return GetBlimpEngineUserAgent(); | 16 return GetBlimpEngineUserAgent(); |
| 17 } | 17 } |
| 18 | 18 |
| 19 base::string16 BlimpContentClient::GetLocalizedString(int message_id) const { | 19 base::string16 BlimpContentClient::GetLocalizedString(int message_id) const { |
| 20 return l10n_util::GetStringUTF16(message_id); | 20 return l10n_util::GetStringUTF16(message_id); |
| 21 } | 21 } |
| 22 | 22 |
| 23 base::StringPiece BlimpContentClient::GetDataResource( | 23 base::StringPiece BlimpContentClient::GetDataResource( |
| 24 int resource_id, | 24 int resource_id, |
| 25 ui::ScaleFactor scale_factor) const { | 25 ui::ScaleFactor scale_factor) const { |
| 26 return ui::ResourceBundle::GetSharedInstance().GetRawDataResourceForScale( | 26 return ui::ResourceBundle::GetSharedInstance().GetRawDataResourceForScale( |
| 27 resource_id, scale_factor); | 27 resource_id, scale_factor); |
| 28 } | 28 } |
| 29 | 29 |
| 30 base::RefCountedStaticMemory* BlimpContentClient::GetDataResourceBytes( | 30 base::RefCountedMemory* BlimpContentClient::GetDataResourceBytes( |
| 31 int resource_id) const { | 31 int resource_id) const { |
| 32 return ui::ResourceBundle::GetSharedInstance().LoadDataResourceBytes( | 32 return ui::ResourceBundle::GetSharedInstance().LoadDataResourceBytes( |
| 33 resource_id); | 33 resource_id); |
| 34 } | 34 } |
| 35 | 35 |
| 36 gfx::Image& BlimpContentClient::GetNativeImageNamed(int resource_id) const { | 36 gfx::Image& BlimpContentClient::GetNativeImageNamed(int resource_id) const { |
| 37 return ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed( | 37 return ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed( |
| 38 resource_id); | 38 resource_id); |
| 39 } | 39 } |
| 40 | 40 |
| 41 } // namespace engine | 41 } // namespace engine |
| 42 } // namespace blimp | 42 } // namespace blimp |
| OLD | NEW |