diff options
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/gfx_resource_provider.cc | 16 | ||||
-rw-r--r-- | chrome/common/gfx_resource_provider.h | 20 |
2 files changed, 36 insertions, 0 deletions
diff --git a/chrome/common/gfx_resource_provider.cc b/chrome/common/gfx_resource_provider.cc new file mode 100644 index 0000000..f508c28 --- /dev/null +++ b/chrome/common/gfx_resource_provider.cc @@ -0,0 +1,16 @@ +// Copyright (c) 2011 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. + +#include "chrome/common/gfx_resource_provider.h" + +#include "app/resource_bundle.h" +#include "base/string_piece.h" + +namespace chrome { + +base::StringPiece GfxResourceProvider(int key) { + return ResourceBundle::GetSharedInstance().GetRawDataResource(key); +} + +} // namespace chrome diff --git a/chrome/common/gfx_resource_provider.h b/chrome/common/gfx_resource_provider.h new file mode 100644 index 0000000..41b67b8 --- /dev/null +++ b/chrome/common/gfx_resource_provider.h @@ -0,0 +1,20 @@ +// Copyright (c) 2011 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_COMMON_GFX_RESOURCE_PROVIDER_H_ +#define CHROME_COMMON_GFX_RESOURCE_PROVIDER_H_ +#pragma once + +namespace base { +class StringPiece; +} + +namespace chrome { + +// This is called indirectly by the gfx theme code to access resources. +base::StringPiece GfxResourceProvider(int key); + +} // namespace chrome + +#endif // CHROME_COMMON_GFX_RESOURCE_PROVIDER_H_ |