| 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 #ifndef UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_ | 5 #ifndef UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_ |
| 6 #define UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_ | 6 #define UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 | 10 |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 // file. Returns a pointer to a shared instance of the GdkPixbuf. This | 173 // file. Returns a pointer to a shared instance of the GdkPixbuf. This |
| 174 // shared GdkPixbuf is owned by the resource bundle and should not be freed. | 174 // shared GdkPixbuf is owned by the resource bundle and should not be freed. |
| 175 // | 175 // |
| 176 // The bitmap is assumed to exist. This function will log in release, and | 176 // The bitmap is assumed to exist. This function will log in release, and |
| 177 // assert in debug mode if it does not. On failure, this will return a | 177 // assert in debug mode if it does not. On failure, this will return a |
| 178 // pointer to a shared empty placeholder bitmap so it will be visible what | 178 // pointer to a shared empty placeholder bitmap so it will be visible what |
| 179 // is missing. | 179 // is missing. |
| 180 // This function flips it in RTL locales. | 180 // This function flips it in RTL locales. |
| 181 GdkPixbuf* GetRTLEnabledPixbufNamed(int resource_id); | 181 GdkPixbuf* GetRTLEnabledPixbufNamed(int resource_id); |
| 182 | 182 |
| 183 // Same as above, but returns a gfx::Image wrapping the GdkPixbuf. |
| 184 gfx::Image& GetRTLEnabledImageNamed(int resource_id); |
| 185 |
| 183 private: | 186 private: |
| 184 // Shared implementation for the above two functions. | 187 // Shared implementation for the above two functions. |
| 185 gfx::Image* GetPixbufImpl(int resource_id, bool rtl_enabled); | 188 gfx::Image* GetPixbufImpl(int resource_id, bool rtl_enabled); |
| 186 | 189 |
| 187 public: | 190 public: |
| 188 #endif | 191 #endif |
| 189 | 192 |
| 190 // TODO(glen): Move these into theme provider (dialogs still depend on | 193 // TODO(glen): Move these into theme provider (dialogs still depend on |
| 191 // ResourceBundle). | 194 // ResourceBundle). |
| 192 static const SkColor frame_color; | 195 static const SkColor frame_color; |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 | 320 |
| 318 DISALLOW_COPY_AND_ASSIGN(ResourceBundle); | 321 DISALLOW_COPY_AND_ASSIGN(ResourceBundle); |
| 319 }; | 322 }; |
| 320 | 323 |
| 321 } // namespace ui | 324 } // namespace ui |
| 322 | 325 |
| 323 // TODO(beng): Someday, maybe, get rid of this. | 326 // TODO(beng): Someday, maybe, get rid of this. |
| 324 using ui::ResourceBundle; | 327 using ui::ResourceBundle; |
| 325 | 328 |
| 326 #endif // UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_ | 329 #endif // UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_ |
| OLD | NEW |