blob: cae9a2d590bfcab35a5bd53427bf163efc9b708c [file] [log] [blame]
Avi Drissman3e1a26c2022-09-15 20:26:031// Copyright 2012 The Chromium Authors
[email protected]ec015c82012-04-12 23:41:532// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef UI_BASE_RESOURCE_RESOURCE_DATA_DLL_WIN_H_
6#define UI_BASE_RESOURCE_RESOURCE_DATA_DLL_WIN_H_
[email protected]ec015c82012-04-12 23:41:537
8#include <windows.h>
avi20f6a6d532015-12-23 08:05:249#include <stdint.h>
[email protected]ec015c82012-04-12 23:41:5310
[email protected]ec015c82012-04-12 23:41:5311#include "ui/base/resource/resource_handle.h"
12
13namespace ui {
14
15class ResourceDataDLL : public ResourceHandle {
16 public:
17 explicit ResourceDataDLL(HINSTANCE module);
Peter Boströmc8c12352021-09-21 23:37:1518
19 ResourceDataDLL(const ResourceDataDLL&) = delete;
20 ResourceDataDLL& operator=(const ResourceDataDLL&) = delete;
21
dcheng98a21052015-04-21 05:14:3822 ~ResourceDataDLL() override;
[email protected]ec015c82012-04-12 23:41:5323
24 // ResourceHandle implementation:
avi20f6a6d532015-12-23 08:05:2425 bool HasResource(uint16_t resource_id) const override;
26 bool GetStringPiece(uint16_t resource_id,
dcheng98a21052015-04-21 05:14:3827 base::StringPiece* data) const override;
28 base::RefCountedStaticMemory* GetStaticMemory(
avi20f6a6d532015-12-23 08:05:2429 uint16_t resource_id) const override;
dcheng98a21052015-04-21 05:14:3830 TextEncodingType GetTextEncodingType() const override;
Mitsuru Oshimad46b99d2021-07-01 14:52:2331 ResourceScaleFactor GetResourceScaleFactor() const override;
Eriko Kurimoto13026d62022-03-03 04:39:3232#if DCHECK_IS_ON()
33 void CheckForDuplicateResources(
34 const std::vector<std::unique_ptr<ResourceHandle>>& packs) override {}
35#endif
[email protected]ec015c82012-04-12 23:41:5336
37 private:
38 const HINSTANCE module_;
[email protected]ec015c82012-04-12 23:41:5339};
40
41} // namespace ui
42
43#endif // UI_BASE_RESOURCE_RESOURCE_DATA_DLL_WIN_H_