| 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 // A resource bundle delegate for Mac. Primary purpose is to intercept certain |
| 12 // resource ids, and to provide assets from system APIs for them at runtime. |
| 13 class MacResourceDelegate : public ui::ResourceBundle::Delegate { |
| 14 public: |
| 15 MacResourceDelegate(); |
| 16 ~MacResourceDelegate() override; |
| 17 |
| 18 // ui:ResourceBundle::Delegate implementation: |
| 19 base::FilePath GetPathForResourcePack(const base::FilePath& pack_path, |
| 20 ui::ScaleFactor scale_factor) override; |
| 21 base::FilePath GetPathForLocalePack(const base::FilePath& pack_path, |
| 22 const std::string& locale) override; |
| 23 gfx::Image GetImageNamed(int resource_id) override; |
| 24 gfx::Image GetNativeImageNamed(int resource_id) override; |
| 25 base::RefCountedStaticMemory* LoadDataResourceBytes( |
| 26 int resource_id, |
| 27 ui::ScaleFactor scale_factor) override; |
| 28 bool GetRawDataResource(int resource_id, |
| 29 ui::ScaleFactor scale_factor, |
| 30 base::StringPiece* value) override; |
| 31 bool GetLocalizedString(int message_id, base::string16* value) override; |
| 32 scoped_ptr<gfx::Font> GetFont(ui::ResourceBundle::FontStyle style) override; |
| 33 |
| 34 private: |
| 35 DISALLOW_COPY_AND_ASSIGN(MacResourceDelegate); |
| 36 }; |
| 37 |
| 38 #endif // CHROME_BROWSER_RESOURCE_DELEGATE_MAC_H_ |
| OLD | NEW |