| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 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 #ifndef CHROME_BROWSER_RESOURCE_DELEGATE_MAC_H_ |
| 6 #define CHROME_BROWSER_RESOURCE_DELEGATE_MAC_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "ui/base/resource/resource_bundle.h" |
| 10 |
| 11 namespace ui { |
| 12 |
| 13 // A resource bundle delegate. Primary purpose is to intercept certain resource |
| 14 // ids and to provide Mac specific assets for them at runtime. |
| 15 class UI_BASE_EXPORT MacResourceDelegate : public ui::ResourceBundle::Delegate { |
| 16 public: |
| 17 MacResourceDelegate(); |
| 18 ~MacResourceDelegate() override; |
| 19 |
| 20 // ui:ResourceBundle::Delegate implementation: |
| 21 base::FilePath GetPathForResourcePack(const base::FilePath& pack_path, |
| 22 ui::ScaleFactor scale_factor) override; |
| 23 base::FilePath GetPathForLocalePack(const base::FilePath& pack_path, |
| 24 const std::string& locale) override; |
| 25 gfx::Image GetImageNamed(int resource_id) override; |
| 26 gfx::Image GetNativeImageNamed(int resource_id, |
| 27 ui::ResourceBundle::ImageRTL rtl) override; |
| 28 base::RefCountedStaticMemory* LoadDataResourceBytes( |
| 29 int resource_id, |
| 30 ui::ScaleFactor scale_factor) override; |
| 31 bool GetRawDataResource(int resource_id, |
| 32 ui::ScaleFactor scale_factor, |
| 33 base::StringPiece* value) override; |
| 34 bool GetLocalizedString(int message_id, base::string16* value) override; |
| 35 scoped_ptr<gfx::Font> GetFont(ui::ResourceBundle::FontStyle style) override; |
| 36 |
| 37 private: |
| 38 DISALLOW_COPY_AND_ASSIGN(MacResourceDelegate); |
| 39 }; |
| 40 |
| 41 } // namespace ui |
| 42 |
| 43 #endif // CHROME_BROWSER_RESOURCE_DELEGATE_MAC_H_ |
| OLD | NEW |