Refer to ui::ResourceBundle with namespace in various dirs.
ResourceBundle became ui::ResourceBundle in r72038 but many callers
still refer to it without the namespace.
Change-Id: Id63635507b65d3d6ffe1fa3a779e189969030b11
Reviewed-on: https://chromium-review.googlesource.com/696138
Reviewed-by: Avi Drissman <[email protected]>
Reviewed-by: Reilly Grant <[email protected]>
Reviewed-by: Sami Kyöstilä <[email protected]>
Reviewed-by: Colin Blundell <[email protected]>
Commit-Queue: Lei Zhang <[email protected]>
Cr-Commit-Position: refs/heads/master@{#506525}
diff --git a/components/about_ui/credit_utils.cc b/components/about_ui/credit_utils.cc
index d6c81ad5..bcd05bd 100644
--- a/components/about_ui/credit_utils.cc
+++ b/components/about_ui/credit_utils.cc
@@ -21,7 +21,7 @@
std::string GetCredits(bool include_scripts) {
std::string response;
base::StringPiece raw_response =
- ResourceBundle::GetSharedInstance().GetRawDataResource(
+ ui::ResourceBundle::GetSharedInstance().GetRawDataResource(
IDR_ABOUT_UI_CREDITS_HTML);
const uint8_t* next_encoded_byte =
reinterpret_cast<const uint8_t*>(raw_response.data());
diff --git a/components/dom_distiller/content/browser/distillable_page_utils.cc b/components/dom_distiller/content/browser/distillable_page_utils.cc
index dd0f962..8ef96066 100644
--- a/components/dom_distiller/content/browser/distillable_page_utils.cc
+++ b/components/dom_distiller/content/browser/distillable_page_utils.cc
@@ -45,7 +45,7 @@
base::Bind(callback, false));
return;
}
- std::string og_article_js = ResourceBundle::GetSharedInstance()
+ std::string og_article_js = ui::ResourceBundle::GetSharedInstance()
.GetRawDataResource(IDR_IS_DISTILLABLE_JS)
.as_string();
RunIsolatedJavaScript(main_frame, og_article_js,
@@ -91,7 +91,7 @@
return;
}
std::string extract_features_js =
- ResourceBundle::GetSharedInstance()
+ ui::ResourceBundle::GetSharedInstance()
.GetRawDataResource(IDR_EXTRACT_PAGE_FEATURES_JS)
.as_string();
RunIsolatedJavaScript(
diff --git a/components/dom_distiller/core/distillable_page_detector.cc b/components/dom_distiller/core/distillable_page_detector.cc
index 8f616e9a..4467a0a 100644
--- a/components/dom_distiller/core/distillable_page_detector.cc
+++ b/components/dom_distiller/core/distillable_page_detector.cc
@@ -17,7 +17,7 @@
static DistillablePageDetector* detector = nullptr;
if (!detector) {
std::string serialized_proto =
- ResourceBundle::GetSharedInstance()
+ ui::ResourceBundle::GetSharedInstance()
.GetRawDataResource(IDR_DISTILLABLE_PAGE_SERIALIZED_MODEL)
.as_string();
std::unique_ptr<AdaBoostProto> proto(new AdaBoostProto);
@@ -31,7 +31,7 @@
static DistillablePageDetector* detector = nullptr;
if (!detector) {
std::string serialized_proto =
- ResourceBundle::GetSharedInstance()
+ ui::ResourceBundle::GetSharedInstance()
.GetRawDataResource(IDR_DISTILLABLE_PAGE_SERIALIZED_MODEL_NEW)
.as_string();
std::unique_ptr<AdaBoostProto> proto(new AdaBoostProto);
@@ -45,7 +45,7 @@
static DistillablePageDetector* detector = nullptr;
if (!detector) {
std::string serialized_proto =
- ResourceBundle::GetSharedInstance()
+ ui::ResourceBundle::GetSharedInstance()
.GetRawDataResource(IDR_LONG_PAGE_SERIALIZED_MODEL)
.as_string();
std::unique_ptr<AdaBoostProto> proto(new AdaBoostProto);
diff --git a/components/dom_distiller/core/distiller_page.cc b/components/dom_distiller/core/distiller_page.cc
index 9466c15..eccdf82a 100644
--- a/components/dom_distiller/core/distiller_page.cc
+++ b/components/dom_distiller/core/distiller_page.cc
@@ -32,7 +32,7 @@
std::string GetDistillerScriptWithOptions(
const dom_distiller::proto::DomDistillerOptions& options,
bool stringify_output) {
- std::string script = ResourceBundle::GetSharedInstance()
+ std::string script = ui::ResourceBundle::GetSharedInstance()
.GetRawDataResource(IDR_DISTILLER_JS)
.as_string();
if (script.empty()) {
diff --git a/components/dom_distiller/core/url_utils.cc b/components/dom_distiller/core/url_utils.cc
index 5c045ae8..bb4ba5a 100644
--- a/components/dom_distiller/core/url_utils.cc
+++ b/components/dom_distiller/core/url_utils.cc
@@ -93,7 +93,7 @@
}
base::StringPiece GetIsDistillableJs() {
- return ResourceBundle::GetSharedInstance().GetRawDataResource(
+ return ui::ResourceBundle::GetSharedInstance().GetRawDataResource(
IDR_IS_DISTILLABLE_JS);
}
diff --git a/components/dom_distiller/core/viewer.cc b/components/dom_distiller/core/viewer.cc
index 66ce1429..41b27d9 100644
--- a/components/dom_distiller/core/viewer.cc
+++ b/components/dom_distiller/core/viewer.cc
@@ -106,7 +106,7 @@
const DistilledPagePrefs::Theme theme,
const DistilledPagePrefs::FontFamily font_family) {
base::StringPiece html_template =
- ResourceBundle::GetSharedInstance().GetRawDataResource(
+ ui::ResourceBundle::GetSharedInstance().GetRawDataResource(
IDR_DOM_DISTILLER_VIEWER_HTML);
std::vector<std::string> substitutions;
@@ -225,22 +225,25 @@
}
const std::string GetCss() {
- return ResourceBundle::GetSharedInstance().GetRawDataResource(
- IDR_DISTILLER_CSS).as_string();
+ return ui::ResourceBundle::GetSharedInstance()
+ .GetRawDataResource(IDR_DISTILLER_CSS)
+ .as_string();
}
const std::string GetLoadingImage() {
- return ResourceBundle::GetSharedInstance().GetRawDataResource(
- IDR_DISTILLER_LOADING_IMAGE).as_string();
+ return ui::ResourceBundle::GetSharedInstance()
+ .GetRawDataResource(IDR_DISTILLER_LOADING_IMAGE)
+ .as_string();
}
const std::string GetIOSCss() {
- return ResourceBundle::GetSharedInstance().GetRawDataResource(
- IDR_DISTILLER_IOS_CSS).as_string();
+ return ui::ResourceBundle::GetSharedInstance()
+ .GetRawDataResource(IDR_DISTILLER_IOS_CSS)
+ .as_string();
}
const std::string GetJavaScript() {
- return ResourceBundle::GetSharedInstance()
+ return ui::ResourceBundle::GetSharedInstance()
.GetRawDataResource(IDR_DOM_DISTILLER_VIEWER_JS)
.as_string();
}
diff --git a/components/history/core/browser/top_sites_impl.cc b/components/history/core/browser/top_sites_impl.cc
index aa81f33..daf38913 100644
--- a/components/history/core/browser/top_sites_impl.cc
+++ b/components/history/core/browser/top_sites_impl.cc
@@ -208,7 +208,7 @@
for (const auto& prepopulated_page : prepopulated_pages_) {
if (url == prepopulated_page.most_visited.url) {
*bytes =
- ResourceBundle::GetSharedInstance().LoadDataResourceBytesForScale(
+ ui::ResourceBundle::GetSharedInstance().LoadDataResourceBytesForScale(
prepopulated_page.thumbnail_id, ui::SCALE_FACTOR_100P);
return true;
}
diff --git a/components/infobars/core/infobar_delegate.cc b/components/infobars/core/infobar_delegate.cc
index 4719771..08c10bc 100644
--- a/components/infobars/core/infobar_delegate.cc
+++ b/components/infobars/core/infobar_delegate.cc
@@ -54,8 +54,10 @@
#endif
int icon_id = GetIconId();
- return icon_id == kNoIconID ? gfx::Image() :
- ResourceBundle::GetSharedInstance().GetNativeImageNamed(icon_id);
+ return icon_id == kNoIconID
+ ? gfx::Image()
+ : ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed(
+ icon_id);
}
bool InfoBarDelegate::EqualsDelegate(InfoBarDelegate* delegate) const {
diff --git a/components/ntp_tiles/icon_cacher_impl.cc b/components/ntp_tiles/icon_cacher_impl.cc
index f2a4ffe..8c7c02c 100644
--- a/components/ntp_tiles/icon_cacher_impl.cc
+++ b/components/ntp_tiles/icon_cacher_impl.cc
@@ -200,7 +200,7 @@
&IconCacherImpl::SaveAndNotifyDefaultIconForSite,
weak_ptr_factory_.GetWeakPtr(), site, preliminary_icon_available)));
image_fetcher_->GetImageDecoder()->DecodeImage(
- ResourceBundle::GetSharedInstance()
+ ui::ResourceBundle::GetSharedInstance()
.GetRawDataResource(site.default_icon_resource)
.as_string(),
gfx::Size(kDesiredFrameSize, kDesiredFrameSize),
diff --git a/components/ntp_tiles/popular_sites_impl.cc b/components/ntp_tiles/popular_sites_impl.cc
index 498b4ca..e6d8eb3 100644
--- a/components/ntp_tiles/popular_sites_impl.cc
+++ b/components/ntp_tiles/popular_sites_impl.cc
@@ -224,7 +224,7 @@
}
std::unique_ptr<base::ListValue> sites =
base::ListValue::From(base::JSONReader::Read(
- ResourceBundle::GetSharedInstance().GetRawDataResource(
+ ui::ResourceBundle::GetSharedInstance().GetRawDataResource(
IDR_DEFAULT_POPULAR_SITES_JSON)));
DCHECK(sites);
for (base::Value& site : *sites) {
diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc
index fc55165..c6b03ed 100644
--- a/components/printing/renderer/print_render_frame_helper.cc
+++ b/components/printing/renderer/print_render_frame_helper.cc
@@ -605,8 +605,8 @@
blink::WebWidgetClient web_widget_client;
blink::WebFrameWidget::Create(&web_widget_client, frame);
- base::Value html(
- base::UTF8ToUTF16(ResourceBundle::GetSharedInstance().GetRawDataResource(
+ base::Value html(base::UTF8ToUTF16(
+ ui::ResourceBundle::GetSharedInstance().GetRawDataResource(
IDR_PRINT_PREVIEW_PAGE)));
// Load page with script to avoid async operations.
ExecuteScript(frame, kPageLoadScriptFormat, html);
diff --git a/components/security_interstitials/content/security_interstitial_page.cc b/components/security_interstitials/content/security_interstitial_page.cc
index eaa95eb..556cc6c 100644
--- a/components/security_interstitials/content/security_interstitial_page.cc
+++ b/components/security_interstitials/content/security_interstitial_page.cc
@@ -115,7 +115,7 @@
PopulateInterstitialStrings(&load_time_data);
webui::SetLoadTimeDataDefaults(
controller()->GetApplicationLocale(), &load_time_data);
- std::string html = ResourceBundle::GetSharedInstance()
+ std::string html = ui::ResourceBundle::GetSharedInstance()
.GetRawDataResource(GetHTMLTemplateId())
.as_string();
webui::AppendWebUiCssTextDefaults(&html);
diff --git a/components/supervised_user_error_page/supervised_user_error_page.cc b/components/supervised_user_error_page/supervised_user_error_page.cc
index 6763db5a..1f8f2f46d 100644
--- a/components/supervised_user_error_page/supervised_user_error_page.cc
+++ b/components/supervised_user_error_page/supervised_user_error_page.cc
@@ -168,7 +168,7 @@
strings.SetString("requestFailedMessage", request_failed_message);
webui::SetLoadTimeDataDefaults(app_locale, &strings);
std::string html =
- ResourceBundle::GetSharedInstance()
+ ui::ResourceBundle::GetSharedInstance()
.GetRawDataResource(IDR_SUPERVISED_USER_BLOCK_INTERSTITIAL_HTML)
.as_string();
webui::AppendWebUiCssTextDefaults(&html);
diff --git a/components/translate/core/browser/translate_script.cc b/components/translate/core/browser/translate_script.cc
index 14b4b27..b4930bf 100644
--- a/components/translate/core/browser/translate_script.cc
+++ b/components/translate/core/browser/translate_script.cc
@@ -154,8 +154,9 @@
&data_, "var securityOrigin = '%s';", security_origin.spec().c_str());
// Append embedded translate.js and a remote element library.
- base::StringPiece str = ResourceBundle::GetSharedInstance().
- GetRawDataResource(IDR_TRANSLATE_JS);
+ base::StringPiece str =
+ ui::ResourceBundle::GetSharedInstance().GetRawDataResource(
+ IDR_TRANSLATE_JS);
str.AppendToString(&data_);
data_ += data;
diff --git a/components/translate/ios/browser/js_translate_manager_unittest.mm b/components/translate/ios/browser/js_translate_manager_unittest.mm
index 76bf4f84..7a20fcb 100644
--- a/components/translate/ios/browser/js_translate_manager_unittest.mm
+++ b/components/translate/ios/browser/js_translate_manager_unittest.mm
@@ -34,7 +34,7 @@
receiver_ = [[CRWTestJSInjectionReceiver alloc] init];
manager_ = [[JsTranslateManager alloc] initWithReceiver:receiver_];
base::StringPiece script =
- ResourceBundle::GetSharedInstance().GetRawDataResource(
+ ui::ResourceBundle::GetSharedInstance().GetRawDataResource(
IDR_TRANSLATE_JS);
[manager_ setScript:base::SysUTF8ToNSString(script.as_string() +
"('DummyKey');")];
diff --git a/content/public/test/browser_test_utils.cc b/content/public/test/browser_test_utils.cc
index 3e98ff0..97d28e21 100644
--- a/content/public/test/browser_test_utils.cc
+++ b/content/public/test/browser_test_utils.cc
@@ -1118,7 +1118,7 @@
iter != ids.end();
++iter) {
scoped_refptr<base::RefCountedMemory> bytes =
- ResourceBundle::GetSharedInstance().LoadDataResourceBytes(*iter);
+ ui::ResourceBundle::GetSharedInstance().LoadDataResourceBytes(*iter);
if (HasGzipHeader(*bytes))
AppendGzippedResource(*bytes, &script);
diff --git a/content/shell/browser/shell_devtools_manager_delegate.cc b/content/shell/browser/shell_devtools_manager_delegate.cc
index 68145ba..3978da9 100644
--- a/content/shell/browser/shell_devtools_manager_delegate.cc
+++ b/content/shell/browser/shell_devtools_manager_delegate.cc
@@ -200,8 +200,9 @@
#if defined(OS_ANDROID)
return std::string();
#else
- return ResourceBundle::GetSharedInstance().GetRawDataResource(
- IDR_CONTENT_SHELL_DEVTOOLS_DISCOVERY_PAGE).as_string();
+ return ui::ResourceBundle::GetSharedInstance()
+ .GetRawDataResource(IDR_CONTENT_SHELL_DEVTOOLS_DISCOVERY_PAGE)
+ .as_string();
#endif
}
diff --git a/content/shell/common/shell_content_client.cc b/content/shell/common/shell_content_client.cc
index 3cc7fd0..715c3be 100644
--- a/content/shell/common/shell_content_client.cc
+++ b/content/shell/common/shell_content_client.cc
@@ -72,17 +72,19 @@
break;
}
}
- return ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(
+ return ui::ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(
resource_id, scale_factor);
}
base::RefCountedMemory* ShellContentClient::GetDataResourceBytes(
int resource_id) const {
- return ResourceBundle::GetSharedInstance().LoadDataResourceBytes(resource_id);
+ return ui::ResourceBundle::GetSharedInstance().LoadDataResourceBytes(
+ resource_id);
}
gfx::Image& ShellContentClient::GetNativeImageNamed(int resource_id) const {
- return ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id);
+ return ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed(
+ resource_id);
}
bool ShellContentClient::IsSupplementarySiteIsolationModeEnabled() {
diff --git a/extensions/browser/api/execute_code_function.cc b/extensions/browser/api/execute_code_function.cc
index 0c9efcb..40b2be4 100644
--- a/extensions/browser/api/execute_code_function.cc
+++ b/extensions/browser/api/execute_code_function.cc
@@ -221,7 +221,7 @@
resource_.relative_path(),
&resource_id)) {
base::StringPiece resource =
- ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id);
+ ui::ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id);
std::unique_ptr<std::string> data(
new std::string(resource.data(), resource.size()));
diff --git a/extensions/browser/extension_user_script_loader.cc b/extensions/browser/extension_user_script_loader.cc
index a738ba3..ca22f21b 100644
--- a/extensions/browser/extension_user_script_loader.cc
+++ b/extensions/browser/extension_user_script_loader.cc
@@ -75,7 +75,7 @@
->IsComponentExtensionResource(script_file->extension_root(),
script_file->relative_path(),
&resource_id)) {
- const ResourceBundle& rb = ResourceBundle::GetSharedInstance();
+ const ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
content = rb.GetRawDataResource(resource_id).as_string();
} else {
LOG(WARNING) << "Failed to get file path to "
diff --git a/extensions/browser/image_loader.cc b/extensions/browser/image_loader.cc
index a5b499e..33114e1 100644
--- a/extensions/browser/image_loader.cc
+++ b/extensions/browser/image_loader.cc
@@ -71,7 +71,7 @@
DCHECK_CURRENTLY_ON(BrowserThread::UI);
gfx::ImageSkia image(
- *ResourceBundle::GetSharedInstance().GetImageSkiaNamed(resource_id));
+ *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(resource_id));
image.MakeThreadSafe();
*bitmap = *image.bitmap();
}
diff --git a/extensions/common/features/json_feature_provider_source.cc b/extensions/common/features/json_feature_provider_source.cc
index caf0914..2d56b3b 100644
--- a/extensions/common/features/json_feature_provider_source.cc
+++ b/extensions/common/features/json_feature_provider_source.cc
@@ -22,7 +22,7 @@
void JSONFeatureProviderSource::LoadJSON(int resource_id) {
const base::StringPiece features_file =
- ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id);
+ ui::ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id);
int error_code = 0;
std::string error_message;
std::unique_ptr<base::Value> value(base::JSONReader::ReadAndReturnError(
diff --git a/extensions/renderer/dispatcher.cc b/extensions/renderer/dispatcher.cc
index 4e95fcd..8e50fc2 100644
--- a/extensions/renderer/dispatcher.cc
+++ b/extensions/renderer/dispatcher.cc
@@ -194,7 +194,7 @@
Dispatcher::Dispatcher(DispatcherDelegate* delegate)
: delegate_(delegate),
content_watcher_(new ContentWatcher()),
- source_map_(&ResourceBundle::GetSharedInstance()),
+ source_map_(&ui::ResourceBundle::GetSharedInstance()),
v8_schema_registry_(new V8SchemaRegistry),
user_script_set_manager_observer_(this),
activity_logging_enabled_(false) {
@@ -447,7 +447,7 @@
// Fetch the source code for service_worker_bindings.js.
base::StringPiece script_resource =
- ResourceBundle::GetSharedInstance().GetRawDataResource(
+ ui::ResourceBundle::GetSharedInstance().GetRawDataResource(
IDR_SERVICE_WORKER_BINDINGS_JS);
v8::Local<v8::String> script = v8::String::NewExternal(
isolate, new StaticV8ExternalOneByteStringResource(script_resource));
@@ -544,7 +544,7 @@
(extension->is_extension() || extension->is_platform_app())) {
int resource_id = extension->is_platform_app() ? IDR_PLATFORM_APP_CSS
: IDR_EXTENSION_FONTS_CSS;
- std::string stylesheet = ResourceBundle::GetSharedInstance()
+ std::string stylesheet = ui::ResourceBundle::GetSharedInstance()
.GetRawDataResource(resource_id)
.as_string();
base::ReplaceFirstSubstringAfterOffset(
@@ -564,7 +564,7 @@
OptionsPageInfo::ShouldUseChromeStyle(extension) &&
effective_document_url == OptionsPageInfo::GetOptionsPage(extension)) {
base::StringPiece extension_css =
- ResourceBundle::GetSharedInstance().GetRawDataResource(
+ ui::ResourceBundle::GetSharedInstance().GetRawDataResource(
IDR_EXTENSION_CSS);
frame->GetDocument().InsertStyleSheet(
WebString::FromUTF8(extension_css.data(), extension_css.length()));
diff --git a/extensions/renderer/module_system_test.cc b/extensions/renderer/module_system_test.cc
index 198765b..568fa7d 100644
--- a/extensions/renderer/module_system_test.cc
+++ b/extensions/renderer/module_system_test.cc
@@ -190,7 +190,7 @@
void ModuleSystemTestEnvironment::RegisterModule(const std::string& name,
int resource_id) {
- const std::string& code = ResourceBundle::GetSharedInstance()
+ const std::string& code = ui::ResourceBundle::GetSharedInstance()
.GetRawDataResource(resource_id)
.as_string();
source_map_->RegisterModule(name, code);
diff --git a/extensions/renderer/user_script_injector.cc b/extensions/renderer/user_script_injector.cc
index 5991210..9be67bcf 100644
--- a/extensions/renderer/user_script_injector.cc
+++ b/extensions/renderer/user_script_injector.cc
@@ -67,7 +67,7 @@
// the GreasemonkeyApiJs resource.
GreasemonkeyApiJsString::GreasemonkeyApiJsString() {
base::StringPiece source_piece =
- ResourceBundle::GetSharedInstance().GetRawDataResource(
+ ui::ResourceBundle::GetSharedInstance().GetRawDataResource(
IDR_GREASEMONKEY_API_JS);
source_ =
blink::WebString::FromUTF8(source_piece.data(), source_piece.length());
diff --git a/extensions/shell/common/shell_content_client.cc b/extensions/shell/common/shell_content_client.cc
index 0fa984b..436355c3 100644
--- a/extensions/shell/common/shell_content_client.cc
+++ b/extensions/shell/common/shell_content_client.cc
@@ -96,17 +96,19 @@
base::StringPiece ShellContentClient::GetDataResource(
int resource_id,
ui::ScaleFactor scale_factor) const {
- return ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(
+ return ui::ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(
resource_id, scale_factor);
}
base::RefCountedMemory* ShellContentClient::GetDataResourceBytes(
int resource_id) const {
- return ResourceBundle::GetSharedInstance().LoadDataResourceBytes(resource_id);
+ return ui::ResourceBundle::GetSharedInstance().LoadDataResourceBytes(
+ resource_id);
}
gfx::Image& ShellContentClient::GetNativeImageNamed(int resource_id) const {
- return ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id);
+ return ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed(
+ resource_id);
}
} // namespace extensions
diff --git a/headless/lib/browser/headless_devtools_manager_delegate.cc b/headless/lib/browser/headless_devtools_manager_delegate.cc
index 3e39b54..606c204 100644
--- a/headless/lib/browser/headless_devtools_manager_delegate.cc
+++ b/headless/lib/browser/headless_devtools_manager_delegate.cc
@@ -277,7 +277,7 @@
}
std::string HeadlessDevToolsManagerDelegate::GetDiscoveryPageHTML() {
- return ResourceBundle::GetSharedInstance()
+ return ui::ResourceBundle::GetSharedInstance()
.GetRawDataResource(IDR_HEADLESS_LIB_DEVTOOLS_DISCOVERY_PAGE)
.as_string();
}
diff --git a/headless/lib/headless_content_client.cc b/headless/lib/headless_content_client.cc
index 333f43a..fa06d5a 100644
--- a/headless/lib/headless_content_client.cc
+++ b/headless/lib/headless_content_client.cc
@@ -29,17 +29,19 @@
base::StringPiece HeadlessContentClient::GetDataResource(
int resource_id,
ui::ScaleFactor scale_factor) const {
- return ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(
+ return ui::ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(
resource_id, scale_factor);
}
base::RefCountedMemory* HeadlessContentClient::GetDataResourceBytes(
int resource_id) const {
- return ResourceBundle::GetSharedInstance().LoadDataResourceBytes(resource_id);
+ return ui::ResourceBundle::GetSharedInstance().LoadDataResourceBytes(
+ resource_id);
}
gfx::Image& HeadlessContentClient::GetNativeImageNamed(int resource_id) const {
- return ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id);
+ return ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed(
+ resource_id);
}
} // namespace headless
diff --git a/headless/lib/headless_content_main_delegate.cc b/headless/lib/headless_content_main_delegate.cc
index 195ee80..d08c3f6 100644
--- a/headless/lib/headless_content_main_delegate.cc
+++ b/headless/lib/headless_content_main_delegate.cc
@@ -276,7 +276,7 @@
locale, nullptr, ui::ResourceBundle::DO_NOT_LOAD_COMMON_RESOURCES);
#ifdef HEADLESS_USE_EMBEDDED_RESOURCES
- ResourceBundle::GetSharedInstance().AddDataPackFromBuffer(
+ ui::ResourceBundle::GetSharedInstance().AddDataPackFromBuffer(
base::StringPiece(
reinterpret_cast<const char*>(kHeadlessResourcePak.contents),
kHeadlessResourcePak.length),
@@ -294,7 +294,7 @@
base::FilePath headless_pak =
dir_module.Append(FILE_PATH_LITERAL("headless_lib.pak"));
if (base::PathExists(headless_pak)) {
- ResourceBundle::GetSharedInstance().AddDataPackFromPath(
+ ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath(
headless_pak, ui::SCALE_FACTOR_NONE);
return;
}
@@ -320,11 +320,11 @@
}
#endif
- ResourceBundle::GetSharedInstance().AddDataPackFromPath(
+ ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath(
resources_pak, ui::SCALE_FACTOR_NONE);
- ResourceBundle::GetSharedInstance().AddDataPackFromPath(
+ ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath(
chrome_100_pak, ui::SCALE_FACTOR_100P);
- ResourceBundle::GetSharedInstance().AddDataPackFromPath(
+ ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath(
chrome_200_pak, ui::SCALE_FACTOR_200P);
#endif
}
diff --git a/headless/test/headless_js_bindings_browsertest.cc b/headless/test/headless_js_bindings_browsertest.cc
index ed09e13..3f8549b6 100644
--- a/headless/test/headless_js_bindings_browsertest.cc
+++ b/headless/test/headless_js_bindings_browsertest.cc
@@ -36,7 +36,7 @@
base::FilePath pak_path;
ASSERT_TRUE(PathService::Get(base::DIR_MODULE, &pak_path));
pak_path = pak_path.AppendASCII("headless_browser_tests.pak");
- ResourceBundle::GetSharedInstance().AddDataPackFromPath(
+ ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath(
pak_path, ui::SCALE_FACTOR_NONE);
}
@@ -54,7 +54,7 @@
void OnInstalledHeadlessTabSocket(int v8_exection_context_id) {
main_world_execution_context_id_ = v8_exection_context_id;
devtools_client_->GetRuntime()->Evaluate(
- ResourceBundle::GetSharedInstance()
+ ui::ResourceBundle::GetSharedInstance()
.GetRawDataResource(DEVTOOLS_BINDINGS_TEST)
.as_string(),
base::Bind(&HeadlessJsBindingsTest::OnEvaluateResult,