| Index: chromecast/port/ui/base/resource/resource_bundle_cast.cc
|
| diff --git a/ui/base/resource/resource_bundle_android.cc b/chromecast/port/ui/base/resource/resource_bundle_cast.cc
|
| similarity index 53%
|
| copy from ui/base/resource/resource_bundle_android.cc
|
| copy to chromecast/port/ui/base/resource/resource_bundle_cast.cc
|
| index b1942696603bd1d743799e08d3277e9c6cd1a3a1..499f931545bfea56d9310e74416f8901fa2414f3 100644
|
| --- a/ui/base/resource/resource_bundle_android.cc
|
| +++ b/chromecast/port/ui/base/resource/resource_bundle_cast.cc
|
| @@ -1,32 +1,36 @@
|
| -// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2014 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 "ui/base/resource/resource_bundle.h"
|
| -
|
| -#include <string>
|
| -
|
| -#include "base/file_util.h"
|
| -#include "base/files/file_path.h"
|
| #include "base/logging.h"
|
| #include "base/path_service.h"
|
| -#include "base/strings/stringprintf.h"
|
| +#include "ui/base/resource/resource_bundle.h"
|
| #include "ui/base/resource/resource_handle.h"
|
| -#include "ui/base/ui_base_paths.h"
|
| +
|
| +namespace {
|
| +
|
| +base::FilePath GetResourcesPakFilePath(const std::string& pak_name) {
|
| + base::FilePath path;
|
| + if (PathService::Get(base::DIR_MODULE, &path))
|
| + return path.AppendASCII(pak_name.c_str());
|
| +
|
| + // Return just the name of the pack file.
|
| + return base::FilePath(pak_name.c_str());
|
| +}
|
| +
|
| +} // namespace
|
|
|
| namespace ui {
|
|
|
| void ResourceBundle::LoadCommonResources() {
|
| - base::FilePath path;
|
| - PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &path);
|
| - AddDataPackFromPath(path.AppendASCII("chrome_100_percent.pak"),
|
| + AddDataPackFromPath(GetResourcesPakFilePath("cast_shell.pak"),
|
| SCALE_FACTOR_100P);
|
| }
|
|
|
| gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id, ImageRTL rtl) {
|
| - // Flipped image is not used on Android.
|
| + // Flipped image is not used on Chromecast.
|
| DCHECK_EQ(rtl, RTL_DISABLED);
|
| return GetImageNamed(resource_id);
|
| }
|
|
|
| -}
|
| +} // namespace ui
|
|
|