Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1861)

Unified Diff: chrome/browser/resource_delegate_mac.h

Issue 1585013002: MacViews: Use Cocoa folder icons in tree views. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed review comments. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chrome_browser_main_mac.mm ('k') | chrome/browser/resource_delegate_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..92e647c550d92c80348a3ec0362e4c7ab2e4cc7f
--- /dev/null
+++ b/chrome/browser/resource_delegate_mac.h
@@ -0,0 +1,38 @@
+// 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"
+
+// A resource bundle delegate for Mac. Primary purpose is to intercept certain
+// resource ids, and to provide assets from system APIs for them at runtime.
+class MacResourceDelegate : public ui::ResourceBundle::Delegate {
+ 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) 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);
+};
+
+#endif // CHROME_BROWSER_RESOURCE_DELEGATE_MAC_H_
« no previous file with comments | « chrome/browser/chrome_browser_main_mac.mm ('k') | chrome/browser/resource_delegate_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698