summaryrefslogtreecommitdiff
path: root/chromium/ui/base/resource/resource_data_dll_win.h
blob: 1e21a828e29fc481df46e6753f6005bed223876d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright (c) 2012 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 UI_BASE_RESOURCE_RESOURCE_DATA_DLL_WIN_H_
#define UI_BASE_RESOURCE_RESOURCE_DATA_DLL_WIN_H_

#include <windows.h>
#include <stdint.h>

#include "base/compiler_specific.h"
#include "base/macros.h"
#include "ui/base/resource/resource_handle.h"

namespace ui {

class ResourceDataDLL : public ResourceHandle {
 public:
  explicit ResourceDataDLL(HINSTANCE module);
  ~ResourceDataDLL() override;

  // ResourceHandle implementation:
  bool HasResource(uint16_t resource_id) const override;
  bool IsGzipped(uint16_t resource_id, bool* is_gzipped) const override;
  bool GetStringPiece(uint16_t resource_id,
                      base::StringPiece* data) const override;
  base::RefCountedStaticMemory* GetStaticMemory(
      uint16_t resource_id) const override;
  TextEncodingType GetTextEncodingType() const override;
  ScaleFactor GetScaleFactor() const override;

 private:
  const HINSTANCE module_;

  DISALLOW_COPY_AND_ASSIGN(ResourceDataDLL);
};

}  // namespace ui

#endif  // UI_BASE_RESOURCE_RESOURCE_DATA_DLL_WIN_H_