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