Chromium Code Reviews| Index: chrome/browser/resource_delegate_mac.h |
| diff --git a/chrome/browser/resource_delegate_mac.h b/chrome/browser/resource_delegate_mac.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..293cef4b8ce5a02ba53bd041410f57b74d3871ed |
| --- /dev/null |
| +++ b/chrome/browser/resource_delegate_mac.h |
| @@ -0,0 +1,43 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_RESOURCE_DELEGATE_MAC_H_ |
| +#define CHROME_BROWSER_RESOURCE_DELEGATE_MAC_H_ |
| + |
| +#include "base/macros.h" |
| +#include "ui/base/resource/resource_bundle.h" |
| + |
| +namespace ui { |
|
tapted
2016/01/19 00:36:52
whoops - stuff under chrome/* doesn't (usually) be
karandeepb
2016/01/20 10:22:37
Done.
|
| + |
| +// A resource bundle delegate. Primary purpose is to intercept certain resource |
|
tapted
2016/01/19 00:36:52
A resource bundle delegate -> A resource bundle de
karandeepb
2016/01/20 10:22:37
Done.
|
| +// ids and to provide Mac specific assets for them at runtime. |
|
tapted
2016/01/19 00:36:52
There are other ways to provide Mac-specific asset
karandeepb
2016/01/20 10:22:37
Done.
|
| +class UI_BASE_EXPORT MacResourceDelegate : public ui::ResourceBundle::Delegate { |
|
tapted
2016/01/19 00:36:52
remove UI_BASE_EXPORT
karandeepb
2016/01/20 10:22:37
Done.
|
| + public: |
| + MacResourceDelegate(); |
| + ~MacResourceDelegate() override; |
| + |
| + // ui:ResourceBundle::Delegate implementation: |
| + base::FilePath GetPathForResourcePack(const base::FilePath& pack_path, |
| + ui::ScaleFactor scale_factor) override; |
| + base::FilePath GetPathForLocalePack(const base::FilePath& pack_path, |
| + const std::string& locale) override; |
| + gfx::Image GetImageNamed(int resource_id) override; |
| + gfx::Image GetNativeImageNamed(int resource_id, |
| + ui::ResourceBundle::ImageRTL rtl) override; |
| + base::RefCountedStaticMemory* LoadDataResourceBytes( |
| + int resource_id, |
| + ui::ScaleFactor scale_factor) override; |
| + bool GetRawDataResource(int resource_id, |
| + ui::ScaleFactor scale_factor, |
| + base::StringPiece* value) override; |
| + bool GetLocalizedString(int message_id, base::string16* value) override; |
| + scoped_ptr<gfx::Font> GetFont(ui::ResourceBundle::FontStyle style) override; |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(MacResourceDelegate); |
| +}; |
| + |
| +} // namespace ui |
| + |
| +#endif // CHROME_BROWSER_RESOURCE_DELEGATE_MAC_H_ |