2013-04-03 20:20:59 +02:00
|
|
|
// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights
|
2012-04-03 03:34:16 +02:00
|
|
|
// reserved. Use of this source code is governed by a BSD-style license that
|
|
|
|
// can be found in the LICENSE file.
|
|
|
|
|
|
|
|
#ifndef CEF_TESTS_CEFCLIENT_RESOURCE_UTIL_H_
|
|
|
|
#define CEF_TESTS_CEFCLIENT_RESOURCE_UTIL_H_
|
|
|
|
#pragma once
|
|
|
|
|
2013-04-03 20:20:59 +02:00
|
|
|
#include <string>
|
|
|
|
#include "include/cef_stream.h"
|
2012-04-03 03:34:16 +02:00
|
|
|
|
2013-04-03 20:20:59 +02:00
|
|
|
#if defined(OS_POSIX)
|
|
|
|
// Returns the directory containing resource files.
|
|
|
|
bool GetResourceDir(std::string& dir);
|
|
|
|
#endif
|
2012-04-03 03:34:16 +02:00
|
|
|
|
2013-04-03 20:20:59 +02:00
|
|
|
// Retrieve a resource as a string.
|
2012-04-03 03:34:16 +02:00
|
|
|
bool LoadBinaryResource(const char* resource_name, std::string& resource_data);
|
|
|
|
|
2013-04-03 20:20:59 +02:00
|
|
|
// Retrieve a resource as a steam reader.
|
2012-04-12 22:21:50 +02:00
|
|
|
CefRefPtr<CefStreamReader> GetBinaryResourceReader(const char* resource_name);
|
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
#endif // CEF_TESTS_CEFCLIENT_RESOURCE_UTIL_H_
|