| OLD | NEW | 
|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "ui/base/resource/resource_bundle.h" | 5 #include "ui/base/resource/resource_bundle.h" | 
| 6 | 6 | 
| 7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> | 
| 8 | 8 | 
| 9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" | 
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" | 
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 59 }  // namespace | 59 }  // namespace | 
| 60 | 60 | 
| 61 // static | 61 // static | 
| 62 FilePath ResourceBundle::GetResourcesFilePath() { | 62 FilePath ResourceBundle::GetResourcesFilePath() { | 
| 63   FilePath resources_file_path; | 63   FilePath resources_file_path; | 
| 64   PathService::Get(ui::FILE_RESOURCES_PAK, &resources_file_path); | 64   PathService::Get(ui::FILE_RESOURCES_PAK, &resources_file_path); | 
| 65   return resources_file_path; | 65   return resources_file_path; | 
| 66 } | 66 } | 
| 67 | 67 | 
| 68 // static | 68 // static | 
|  | 69 FilePath ResourceBundle::GetLargeIconResourcesFilePath() { | 
|  | 70   // Not supported. | 
|  | 71   return FilePath(); | 
|  | 72 } | 
|  | 73 | 
|  | 74 // static | 
| 69 FilePath ResourceBundle::GetLocaleFilePath(const std::string& app_locale) { | 75 FilePath ResourceBundle::GetLocaleFilePath(const std::string& app_locale) { | 
| 70   FilePath locale_file_path; | 76   FilePath locale_file_path; | 
| 71   PathService::Get(ui::DIR_LOCALES, &locale_file_path); | 77   PathService::Get(ui::DIR_LOCALES, &locale_file_path); | 
| 72   if (locale_file_path.empty()) | 78   if (locale_file_path.empty()) | 
| 73     return locale_file_path; | 79     return locale_file_path; | 
| 74   if (app_locale.empty()) | 80   if (app_locale.empty()) | 
| 75     return FilePath(); | 81     return FilePath(); | 
| 76   locale_file_path = locale_file_path.AppendASCII(app_locale + ".pak"); | 82   locale_file_path = locale_file_path.AppendASCII(app_locale + ".pak"); | 
| 77   if (!file_util::PathExists(locale_file_path)) | 83   if (!file_util::PathExists(locale_file_path)) | 
| 78     return FilePath(); | 84     return FilePath(); | 
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 121 | 127 | 
| 122 GdkPixbuf* ResourceBundle::GetPixbufNamed(int resource_id) { | 128 GdkPixbuf* ResourceBundle::GetPixbufNamed(int resource_id) { | 
| 123   return *GetPixbufImpl(resource_id, false); | 129   return *GetPixbufImpl(resource_id, false); | 
| 124 } | 130 } | 
| 125 | 131 | 
| 126 GdkPixbuf* ResourceBundle::GetRTLEnabledPixbufNamed(int resource_id) { | 132 GdkPixbuf* ResourceBundle::GetRTLEnabledPixbufNamed(int resource_id) { | 
| 127   return *GetPixbufImpl(resource_id, true); | 133   return *GetPixbufImpl(resource_id, true); | 
| 128 } | 134 } | 
| 129 | 135 | 
| 130 }  // namespace ui | 136 }  // namespace ui | 
| OLD | NEW | 
|---|