mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Set eol-style property on all files. Future commits will use the subversion auto-props configuration at http://src.chromium.org/viewvc/chrome/trunk/tools/buildbot/slave/config
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@109 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
2400
include/cef.h
2400
include/cef.h
File diff suppressed because it is too large
Load Diff
1962
include/cef_capi.h
1962
include/cef_capi.h
File diff suppressed because it is too large
Load Diff
@@ -1,41 +1,41 @@
|
||||
// Copyright (c) 2009 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
#ifdef _MSC_VER // MSVC
|
||||
#ifdef BUILDING_CEF_SHARED
|
||||
#define CEF_EXPORT __declspec(dllexport)
|
||||
#elif USING_CEF_SHARED
|
||||
#define CEF_EXPORT __declspec(dllimport)
|
||||
#else
|
||||
#define CEF_EXPORT
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#define CEF_CALLBACK __stdcall
|
||||
#endif // MSVC
|
||||
// Copyright (c) 2009 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
#ifdef _MSC_VER // MSVC
|
||||
#ifdef BUILDING_CEF_SHARED
|
||||
#define CEF_EXPORT __declspec(dllexport)
|
||||
#elif USING_CEF_SHARED
|
||||
#define CEF_EXPORT __declspec(dllimport)
|
||||
#else
|
||||
#define CEF_EXPORT
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#define CEF_CALLBACK __stdcall
|
||||
#endif // MSVC
|
||||
|
@@ -1,85 +1,85 @@
|
||||
// Copyright (c) 2008 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
#ifndef _CEF_PLUGIN_H
|
||||
#define _CEF_PLUGIN_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "third_party/npapi/bindings/npapi.h"
|
||||
#include "third_party/npapi/bindings/nphostapi.h"
|
||||
|
||||
// Netscape plugins are normally built at separate DLLs that are loaded by the
|
||||
// browser when needed. This interface supports the creation of plugins that
|
||||
// are an embedded component of the application. Embedded plugins built using
|
||||
// this interface use the same Netscape Plugin API as DLL-based plugins.
|
||||
// See https://developer.mozilla.org/En/Gecko_Plugin_API_Reference for complete
|
||||
// documentation on how to use the Netscape Plugin API.
|
||||
|
||||
// This structure describes a mime type entry for a plugin.
|
||||
struct CefPluginMimeType {
|
||||
// The actual mime type.
|
||||
std::wstring mime_type;
|
||||
|
||||
// A list of all the file extensions for this mime type.
|
||||
std::vector<std::wstring> file_extensions;
|
||||
|
||||
// Description of the mime type.
|
||||
std::wstring description;
|
||||
};
|
||||
|
||||
// This structure provides attribute information and entry point functions for
|
||||
// a plugin.
|
||||
struct CefPluginInfo {
|
||||
// The unique name that identifies the plugin.
|
||||
std::wstring unique_name;
|
||||
|
||||
// The friendly display name of the plugin.
|
||||
std::wstring display_name;
|
||||
|
||||
// The version string of the plugin.
|
||||
std::wstring version;
|
||||
|
||||
// A description of the plugin.
|
||||
std::wstring description;
|
||||
|
||||
// A list of all the mime types that this plugin supports.
|
||||
std::vector<CefPluginMimeType> mime_types;
|
||||
|
||||
// Entry point function pointers.
|
||||
NP_GetEntryPointsFunc np_getentrypoints;
|
||||
NP_InitializeFunc np_initialize;
|
||||
NP_ShutdownFunc np_shutdown;
|
||||
};
|
||||
|
||||
// Register a plugin with the system.
|
||||
bool CefRegisterPlugin(const struct CefPluginInfo& plugin_info);
|
||||
|
||||
#endif // _CEF_PLUGIN_H
|
||||
// Copyright (c) 2008 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
#ifndef _CEF_PLUGIN_H
|
||||
#define _CEF_PLUGIN_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "third_party/npapi/bindings/npapi.h"
|
||||
#include "third_party/npapi/bindings/nphostapi.h"
|
||||
|
||||
// Netscape plugins are normally built at separate DLLs that are loaded by the
|
||||
// browser when needed. This interface supports the creation of plugins that
|
||||
// are an embedded component of the application. Embedded plugins built using
|
||||
// this interface use the same Netscape Plugin API as DLL-based plugins.
|
||||
// See https://developer.mozilla.org/En/Gecko_Plugin_API_Reference for complete
|
||||
// documentation on how to use the Netscape Plugin API.
|
||||
|
||||
// This structure describes a mime type entry for a plugin.
|
||||
struct CefPluginMimeType {
|
||||
// The actual mime type.
|
||||
std::wstring mime_type;
|
||||
|
||||
// A list of all the file extensions for this mime type.
|
||||
std::vector<std::wstring> file_extensions;
|
||||
|
||||
// Description of the mime type.
|
||||
std::wstring description;
|
||||
};
|
||||
|
||||
// This structure provides attribute information and entry point functions for
|
||||
// a plugin.
|
||||
struct CefPluginInfo {
|
||||
// The unique name that identifies the plugin.
|
||||
std::wstring unique_name;
|
||||
|
||||
// The friendly display name of the plugin.
|
||||
std::wstring display_name;
|
||||
|
||||
// The version string of the plugin.
|
||||
std::wstring version;
|
||||
|
||||
// A description of the plugin.
|
||||
std::wstring description;
|
||||
|
||||
// A list of all the mime types that this plugin supports.
|
||||
std::vector<CefPluginMimeType> mime_types;
|
||||
|
||||
// Entry point function pointers.
|
||||
NP_GetEntryPointsFunc np_getentrypoints;
|
||||
NP_InitializeFunc np_initialize;
|
||||
NP_ShutdownFunc np_shutdown;
|
||||
};
|
||||
|
||||
// Register a plugin with the system.
|
||||
bool CefRegisterPlugin(const struct CefPluginInfo& plugin_info);
|
||||
|
||||
#endif // _CEF_PLUGIN_H
|
||||
|
@@ -1,90 +1,90 @@
|
||||
// Copyright (c) 2009 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
#ifndef _CEF_PLUGIN_CAPI_H
|
||||
#define _CEF_PLUGIN_CAPI_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "cef_export.h"
|
||||
#include "third_party/npapi/bindings/npapi.h"
|
||||
#include "third_party/npapi/bindings/nphostapi.h"
|
||||
|
||||
// Netscape plugins are normally built at separate DLLs that are loaded by the
|
||||
// browser when needed. This interface supports the creation of plugins that
|
||||
// are an embedded component of the application. Embedded plugins built using
|
||||
// this interface use the same Netscape Plugin API as DLL-based plugins.
|
||||
// See https://developer.mozilla.org/En/Gecko_Plugin_API_Reference for complete
|
||||
// documentation on how to use the Netscape Plugin API.
|
||||
|
||||
// This structure provides attribute information and entry point functions for
|
||||
// a plugin.
|
||||
typedef struct _cef_plugin_info_t {
|
||||
// The unique name that identifies the plugin.
|
||||
const wchar_t* unique_name;
|
||||
|
||||
// The friendly display name of the plugin.
|
||||
const wchar_t* display_name;
|
||||
|
||||
// The version string of the plugin.
|
||||
const wchar_t* version;
|
||||
|
||||
// A description of the plugin.
|
||||
const wchar_t* description;
|
||||
|
||||
// A pipe (|) delimited list of mime type values that the plugin supports.
|
||||
const wchar_t* mime_types;
|
||||
|
||||
// A pipe (|) delimited list of extension values. Each value is associated
|
||||
// with the mime type value at the same position. Multiple file extensions
|
||||
// for the same mime type may be delimited with commas (,).
|
||||
const wchar_t* file_extensions;
|
||||
|
||||
// A pipe (|) delimited list of description values. Each value is associated
|
||||
// with the mime type value at the same position.
|
||||
const wchar_t* type_descriptions;
|
||||
|
||||
// Entry point function pointers.
|
||||
NP_GetEntryPointsFunc np_getentrypoints;
|
||||
NP_InitializeFunc np_initialize;
|
||||
NP_ShutdownFunc np_shutdown;
|
||||
} cef_plugin_info_t;
|
||||
|
||||
// Register a plugin with the system. Returns true (1) on success.
|
||||
CEF_EXPORT int cef_register_plugin(const cef_plugin_info_t* plugin_info);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _CEF_PLUGIN_CAPI_H
|
||||
// Copyright (c) 2009 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
#ifndef _CEF_PLUGIN_CAPI_H
|
||||
#define _CEF_PLUGIN_CAPI_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "cef_export.h"
|
||||
#include "third_party/npapi/bindings/npapi.h"
|
||||
#include "third_party/npapi/bindings/nphostapi.h"
|
||||
|
||||
// Netscape plugins are normally built at separate DLLs that are loaded by the
|
||||
// browser when needed. This interface supports the creation of plugins that
|
||||
// are an embedded component of the application. Embedded plugins built using
|
||||
// this interface use the same Netscape Plugin API as DLL-based plugins.
|
||||
// See https://developer.mozilla.org/En/Gecko_Plugin_API_Reference for complete
|
||||
// documentation on how to use the Netscape Plugin API.
|
||||
|
||||
// This structure provides attribute information and entry point functions for
|
||||
// a plugin.
|
||||
typedef struct _cef_plugin_info_t {
|
||||
// The unique name that identifies the plugin.
|
||||
const wchar_t* unique_name;
|
||||
|
||||
// The friendly display name of the plugin.
|
||||
const wchar_t* display_name;
|
||||
|
||||
// The version string of the plugin.
|
||||
const wchar_t* version;
|
||||
|
||||
// A description of the plugin.
|
||||
const wchar_t* description;
|
||||
|
||||
// A pipe (|) delimited list of mime type values that the plugin supports.
|
||||
const wchar_t* mime_types;
|
||||
|
||||
// A pipe (|) delimited list of extension values. Each value is associated
|
||||
// with the mime type value at the same position. Multiple file extensions
|
||||
// for the same mime type may be delimited with commas (,).
|
||||
const wchar_t* file_extensions;
|
||||
|
||||
// A pipe (|) delimited list of description values. Each value is associated
|
||||
// with the mime type value at the same position.
|
||||
const wchar_t* type_descriptions;
|
||||
|
||||
// Entry point function pointers.
|
||||
NP_GetEntryPointsFunc np_getentrypoints;
|
||||
NP_InitializeFunc np_initialize;
|
||||
NP_ShutdownFunc np_shutdown;
|
||||
} cef_plugin_info_t;
|
||||
|
||||
// Register a plugin with the system. Returns true (1) on success.
|
||||
CEF_EXPORT int cef_register_plugin(const cef_plugin_info_t* plugin_info);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _CEF_PLUGIN_CAPI_H
|
||||
|
@@ -1,193 +1,193 @@
|
||||
// Copyright (c) 2008 Marshall A. Greenblatt. Portions Copyright (c)
|
||||
// 2006-2008 Google Inc. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
#ifndef _CEF_PTR_H
|
||||
#define _CEF_PTR_H
|
||||
|
||||
// Smart pointer implementation borrowed from base/ref_counted.h
|
||||
//
|
||||
// A smart pointer class for reference counted objects. Use this class instead
|
||||
// of calling AddRef and Release manually on a reference counted object to
|
||||
// avoid common memory leaks caused by forgetting to Release an object
|
||||
// reference. Sample usage:
|
||||
//
|
||||
// class MyFoo : public CefBase {
|
||||
// ...
|
||||
// };
|
||||
//
|
||||
// void some_function() {
|
||||
// // The MyFoo object that |foo| represents starts with a single
|
||||
// // reference.
|
||||
// CefRefPtr<MyFoo> foo = new MyFoo();
|
||||
// foo->Method(param);
|
||||
// // |foo| is released when this function returns
|
||||
// }
|
||||
//
|
||||
// void some_other_function() {
|
||||
// CefRefPtr<MyFoo> foo = new MyFoo();
|
||||
// ...
|
||||
// foo = NULL; // explicitly releases |foo|
|
||||
// ...
|
||||
// if (foo)
|
||||
// foo->Method(param);
|
||||
// }
|
||||
//
|
||||
// The above examples show how CefRefPtr<T> acts like a pointer to T.
|
||||
// Given two CefRefPtr<T> classes, it is also possible to exchange
|
||||
// references between the two objects, like so:
|
||||
//
|
||||
// {
|
||||
// CefRefPtr<MyFoo> a = new MyFoo();
|
||||
// CefRefPtr<MyFoo> b;
|
||||
//
|
||||
// b.swap(a);
|
||||
// // now, |b| references the MyFoo object, and |a| references NULL.
|
||||
// }
|
||||
//
|
||||
// To make both |a| and |b| in the above example reference the same MyFoo
|
||||
// object, simply use the assignment operator:
|
||||
//
|
||||
// {
|
||||
// CefRefPtr<MyFoo> a = new MyFoo();
|
||||
// CefRefPtr<MyFoo> b;
|
||||
//
|
||||
// b = a;
|
||||
// // now, |a| and |b| each own a reference to the same MyFoo object.
|
||||
// // the reference count of the underlying MyFoo object will be 2.
|
||||
// }
|
||||
//
|
||||
// Reference counted objects can also be passed as function parameters and
|
||||
// used as function return values:
|
||||
//
|
||||
// void some_func_with_param(CefRefPtr<MyFoo> param) {
|
||||
// // A reference is added to the MyFoo object that |param| represents
|
||||
// // during the scope of some_func_with_param() and released when
|
||||
// // some_func_with_param() goes out of scope.
|
||||
// }
|
||||
//
|
||||
// CefRefPtr<MyFoo> some_func_with_retval() {
|
||||
// // The MyFoo object that |foox| represents starts with a single
|
||||
// // reference.
|
||||
// CefRefPtr<MyFoo> foox = new MyFoo();
|
||||
//
|
||||
// // Creating the return value adds an additional reference.
|
||||
// return foox;
|
||||
//
|
||||
// // When some_func_with_retval() goes out of scope the original |foox|
|
||||
// // reference is released.
|
||||
// }
|
||||
//
|
||||
// void and_another_function() {
|
||||
// CefRefPtr<MyFoo> foo = new MyFoo();
|
||||
//
|
||||
// // pass |foo| as a parameter.
|
||||
// some_function(foo);
|
||||
//
|
||||
// CefRefPtr<MyFoo> foo2 = some_func_with_retval();
|
||||
// // Now, since we kept a reference to the some_func_with_retval() return
|
||||
// // value, |foo2| is the only class pointing to the MyFoo object created
|
||||
// in some_func_with_retval(), and it has a reference count of 1.
|
||||
//
|
||||
// some_func_with_retval();
|
||||
// // Now, since we didn't keep a reference to the some_func_with_retval()
|
||||
// // return value, the MyFoo object created in some_func_with_retval()
|
||||
// // will automatically be released.
|
||||
// }
|
||||
//
|
||||
// And in standard containers:
|
||||
//
|
||||
// {
|
||||
// // Create a vector that holds MyFoo objects.
|
||||
// std::vector<CefRefPtr<MyFoo> > MyFooVec;
|
||||
//
|
||||
// // The MyFoo object that |foo| represents starts with a single
|
||||
// // reference.
|
||||
// CefRefPtr<MyFoo> foo = new MyFoo();
|
||||
//
|
||||
// // When the MyFoo object is added to |MyFooVec| the reference count
|
||||
// // is increased to 2.
|
||||
// MyFooVec.push_back(foo);
|
||||
// }
|
||||
//
|
||||
template <class T>
|
||||
class CefRefPtr {
|
||||
public:
|
||||
CefRefPtr() : ptr_(NULL) {
|
||||
}
|
||||
|
||||
CefRefPtr(T* p) : ptr_(p) {
|
||||
if (ptr_)
|
||||
ptr_->AddRef();
|
||||
}
|
||||
|
||||
CefRefPtr(const CefRefPtr<T>& r) : ptr_(r.ptr_) {
|
||||
if (ptr_)
|
||||
ptr_->AddRef();
|
||||
}
|
||||
|
||||
~CefRefPtr() {
|
||||
if (ptr_)
|
||||
ptr_->Release();
|
||||
}
|
||||
|
||||
T* get() const { return ptr_; }
|
||||
operator T*() const { return ptr_; }
|
||||
T* operator->() const { return ptr_; }
|
||||
|
||||
CefRefPtr<T>& operator=(T* p) {
|
||||
// AddRef first so that self assignment should work
|
||||
if (p)
|
||||
p->AddRef();
|
||||
if (ptr_ )
|
||||
ptr_ ->Release();
|
||||
ptr_ = p;
|
||||
return *this;
|
||||
}
|
||||
|
||||
CefRefPtr<T>& operator=(const CefRefPtr<T>& r) {
|
||||
return *this = r.ptr_;
|
||||
}
|
||||
|
||||
void swap(T** pp) {
|
||||
T* p = ptr_;
|
||||
ptr_ = *pp;
|
||||
*pp = p;
|
||||
}
|
||||
|
||||
void swap(CefRefPtr<T>& r) {
|
||||
swap(&r.ptr_);
|
||||
}
|
||||
|
||||
private:
|
||||
T* ptr_;
|
||||
};
|
||||
|
||||
#endif // _CEF_PTR_H
|
||||
// Copyright (c) 2008 Marshall A. Greenblatt. Portions Copyright (c)
|
||||
// 2006-2008 Google Inc. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
#ifndef _CEF_PTR_H
|
||||
#define _CEF_PTR_H
|
||||
|
||||
// Smart pointer implementation borrowed from base/ref_counted.h
|
||||
//
|
||||
// A smart pointer class for reference counted objects. Use this class instead
|
||||
// of calling AddRef and Release manually on a reference counted object to
|
||||
// avoid common memory leaks caused by forgetting to Release an object
|
||||
// reference. Sample usage:
|
||||
//
|
||||
// class MyFoo : public CefBase {
|
||||
// ...
|
||||
// };
|
||||
//
|
||||
// void some_function() {
|
||||
// // The MyFoo object that |foo| represents starts with a single
|
||||
// // reference.
|
||||
// CefRefPtr<MyFoo> foo = new MyFoo();
|
||||
// foo->Method(param);
|
||||
// // |foo| is released when this function returns
|
||||
// }
|
||||
//
|
||||
// void some_other_function() {
|
||||
// CefRefPtr<MyFoo> foo = new MyFoo();
|
||||
// ...
|
||||
// foo = NULL; // explicitly releases |foo|
|
||||
// ...
|
||||
// if (foo)
|
||||
// foo->Method(param);
|
||||
// }
|
||||
//
|
||||
// The above examples show how CefRefPtr<T> acts like a pointer to T.
|
||||
// Given two CefRefPtr<T> classes, it is also possible to exchange
|
||||
// references between the two objects, like so:
|
||||
//
|
||||
// {
|
||||
// CefRefPtr<MyFoo> a = new MyFoo();
|
||||
// CefRefPtr<MyFoo> b;
|
||||
//
|
||||
// b.swap(a);
|
||||
// // now, |b| references the MyFoo object, and |a| references NULL.
|
||||
// }
|
||||
//
|
||||
// To make both |a| and |b| in the above example reference the same MyFoo
|
||||
// object, simply use the assignment operator:
|
||||
//
|
||||
// {
|
||||
// CefRefPtr<MyFoo> a = new MyFoo();
|
||||
// CefRefPtr<MyFoo> b;
|
||||
//
|
||||
// b = a;
|
||||
// // now, |a| and |b| each own a reference to the same MyFoo object.
|
||||
// // the reference count of the underlying MyFoo object will be 2.
|
||||
// }
|
||||
//
|
||||
// Reference counted objects can also be passed as function parameters and
|
||||
// used as function return values:
|
||||
//
|
||||
// void some_func_with_param(CefRefPtr<MyFoo> param) {
|
||||
// // A reference is added to the MyFoo object that |param| represents
|
||||
// // during the scope of some_func_with_param() and released when
|
||||
// // some_func_with_param() goes out of scope.
|
||||
// }
|
||||
//
|
||||
// CefRefPtr<MyFoo> some_func_with_retval() {
|
||||
// // The MyFoo object that |foox| represents starts with a single
|
||||
// // reference.
|
||||
// CefRefPtr<MyFoo> foox = new MyFoo();
|
||||
//
|
||||
// // Creating the return value adds an additional reference.
|
||||
// return foox;
|
||||
//
|
||||
// // When some_func_with_retval() goes out of scope the original |foox|
|
||||
// // reference is released.
|
||||
// }
|
||||
//
|
||||
// void and_another_function() {
|
||||
// CefRefPtr<MyFoo> foo = new MyFoo();
|
||||
//
|
||||
// // pass |foo| as a parameter.
|
||||
// some_function(foo);
|
||||
//
|
||||
// CefRefPtr<MyFoo> foo2 = some_func_with_retval();
|
||||
// // Now, since we kept a reference to the some_func_with_retval() return
|
||||
// // value, |foo2| is the only class pointing to the MyFoo object created
|
||||
// in some_func_with_retval(), and it has a reference count of 1.
|
||||
//
|
||||
// some_func_with_retval();
|
||||
// // Now, since we didn't keep a reference to the some_func_with_retval()
|
||||
// // return value, the MyFoo object created in some_func_with_retval()
|
||||
// // will automatically be released.
|
||||
// }
|
||||
//
|
||||
// And in standard containers:
|
||||
//
|
||||
// {
|
||||
// // Create a vector that holds MyFoo objects.
|
||||
// std::vector<CefRefPtr<MyFoo> > MyFooVec;
|
||||
//
|
||||
// // The MyFoo object that |foo| represents starts with a single
|
||||
// // reference.
|
||||
// CefRefPtr<MyFoo> foo = new MyFoo();
|
||||
//
|
||||
// // When the MyFoo object is added to |MyFooVec| the reference count
|
||||
// // is increased to 2.
|
||||
// MyFooVec.push_back(foo);
|
||||
// }
|
||||
//
|
||||
template <class T>
|
||||
class CefRefPtr {
|
||||
public:
|
||||
CefRefPtr() : ptr_(NULL) {
|
||||
}
|
||||
|
||||
CefRefPtr(T* p) : ptr_(p) {
|
||||
if (ptr_)
|
||||
ptr_->AddRef();
|
||||
}
|
||||
|
||||
CefRefPtr(const CefRefPtr<T>& r) : ptr_(r.ptr_) {
|
||||
if (ptr_)
|
||||
ptr_->AddRef();
|
||||
}
|
||||
|
||||
~CefRefPtr() {
|
||||
if (ptr_)
|
||||
ptr_->Release();
|
||||
}
|
||||
|
||||
T* get() const { return ptr_; }
|
||||
operator T*() const { return ptr_; }
|
||||
T* operator->() const { return ptr_; }
|
||||
|
||||
CefRefPtr<T>& operator=(T* p) {
|
||||
// AddRef first so that self assignment should work
|
||||
if (p)
|
||||
p->AddRef();
|
||||
if (ptr_ )
|
||||
ptr_ ->Release();
|
||||
ptr_ = p;
|
||||
return *this;
|
||||
}
|
||||
|
||||
CefRefPtr<T>& operator=(const CefRefPtr<T>& r) {
|
||||
return *this = r.ptr_;
|
||||
}
|
||||
|
||||
void swap(T** pp) {
|
||||
T* p = ptr_;
|
||||
ptr_ = *pp;
|
||||
*pp = p;
|
||||
}
|
||||
|
||||
void swap(CefRefPtr<T>& r) {
|
||||
swap(&r.ptr_);
|
||||
}
|
||||
|
||||
private:
|
||||
T* ptr_;
|
||||
};
|
||||
|
||||
#endif // _CEF_PTR_H
|
||||
|
@@ -1,86 +1,86 @@
|
||||
// Copyright (c) 2009 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#ifndef _CEF_STRING_H
|
||||
#define _CEF_STRING_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "cef_export.h"
|
||||
#include <wchar.h>
|
||||
|
||||
// CEF strings are NUL-terminated wide character strings prefixed with a size
|
||||
// value, similar to the Microsoft BSTR type. Use the below API functions for
|
||||
// allocating, managing and freeing CEF strings.
|
||||
typedef wchar_t* cef_string_t;
|
||||
|
||||
// Return the wide character length of the CEF string as allocated by
|
||||
// cef_string_alloc_len(). The returned value does not include the NUL
|
||||
// terminating character. This length may differ from the string length
|
||||
// as returned by wcslen().
|
||||
CEF_EXPORT size_t cef_string_length(cef_string_t str);
|
||||
|
||||
// Allocate and return a new CEF string that is a copy of |str|. If |str| is
|
||||
// NULL or if allocation fails NULL will be returned. If |str| is of length
|
||||
// 0 a valid empty CEF string will be returned.
|
||||
CEF_EXPORT cef_string_t cef_string_alloc(const wchar_t* str);
|
||||
|
||||
// Allocate and return a new CEF string that is a copy of |str|. |len| is the
|
||||
// wide character length of the new CEF string not including the NUL
|
||||
// terminating character. |str| will be copied without checking for a NUL
|
||||
// terminating character. If |str| is NULL or if allocation fails NULL will
|
||||
// be returned. If |str| is of length 0 a valid empty CEF string will be
|
||||
// returned.
|
||||
CEF_EXPORT cef_string_t cef_string_alloc_length(const wchar_t* str,
|
||||
size_t len);
|
||||
|
||||
// Reallocate an existing CEF string. The contents of |oldstr| will be
|
||||
// replaced with the contents of |newstr|; |newstr| may not be NULL. Returns 1
|
||||
// on success and 0 on failure.
|
||||
CEF_EXPORT int cef_string_realloc(cef_string_t* oldstr, const wchar_t* newstr);
|
||||
|
||||
// Reallocate an existing CEF string. If |newstr| is NULL the contents of
|
||||
// |oldstr| will remain unchanged; otherwise, they will be replaced with the
|
||||
// contents of |newstr|. |len| is the new wide character length of the string
|
||||
// not including the NUL terminating character. Returns 1 on success and 0
|
||||
// on failure.
|
||||
CEF_EXPORT int cef_string_realloc_length(cef_string_t* oldstr,
|
||||
const wchar_t* newstr,
|
||||
size_t len);
|
||||
|
||||
// Free a CEF string. If |str| is NULL this function does nothing.
|
||||
CEF_EXPORT void cef_string_free(cef_string_t str);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _CEF_STRING_H
|
||||
// Copyright (c) 2009 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#ifndef _CEF_STRING_H
|
||||
#define _CEF_STRING_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "cef_export.h"
|
||||
#include <wchar.h>
|
||||
|
||||
// CEF strings are NUL-terminated wide character strings prefixed with a size
|
||||
// value, similar to the Microsoft BSTR type. Use the below API functions for
|
||||
// allocating, managing and freeing CEF strings.
|
||||
typedef wchar_t* cef_string_t;
|
||||
|
||||
// Return the wide character length of the CEF string as allocated by
|
||||
// cef_string_alloc_len(). The returned value does not include the NUL
|
||||
// terminating character. This length may differ from the string length
|
||||
// as returned by wcslen().
|
||||
CEF_EXPORT size_t cef_string_length(cef_string_t str);
|
||||
|
||||
// Allocate and return a new CEF string that is a copy of |str|. If |str| is
|
||||
// NULL or if allocation fails NULL will be returned. If |str| is of length
|
||||
// 0 a valid empty CEF string will be returned.
|
||||
CEF_EXPORT cef_string_t cef_string_alloc(const wchar_t* str);
|
||||
|
||||
// Allocate and return a new CEF string that is a copy of |str|. |len| is the
|
||||
// wide character length of the new CEF string not including the NUL
|
||||
// terminating character. |str| will be copied without checking for a NUL
|
||||
// terminating character. If |str| is NULL or if allocation fails NULL will
|
||||
// be returned. If |str| is of length 0 a valid empty CEF string will be
|
||||
// returned.
|
||||
CEF_EXPORT cef_string_t cef_string_alloc_length(const wchar_t* str,
|
||||
size_t len);
|
||||
|
||||
// Reallocate an existing CEF string. The contents of |oldstr| will be
|
||||
// replaced with the contents of |newstr|; |newstr| may not be NULL. Returns 1
|
||||
// on success and 0 on failure.
|
||||
CEF_EXPORT int cef_string_realloc(cef_string_t* oldstr, const wchar_t* newstr);
|
||||
|
||||
// Reallocate an existing CEF string. If |newstr| is NULL the contents of
|
||||
// |oldstr| will remain unchanged; otherwise, they will be replaced with the
|
||||
// contents of |newstr|. |len| is the new wide character length of the string
|
||||
// not including the NUL terminating character. Returns 1 on success and 0
|
||||
// on failure.
|
||||
CEF_EXPORT int cef_string_realloc_length(cef_string_t* oldstr,
|
||||
const wchar_t* newstr,
|
||||
size_t len);
|
||||
|
||||
// Free a CEF string. If |str| is NULL this function does nothing.
|
||||
CEF_EXPORT void cef_string_free(cef_string_t str);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _CEF_STRING_H
|
||||
|
@@ -1,67 +1,67 @@
|
||||
// Copyright (c) 2009 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#ifndef _CEF_STRING_LIST_H
|
||||
#define _CEF_STRING_LIST_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "cef_export.h"
|
||||
#include "cef_string.h"
|
||||
#include <wchar.h>
|
||||
|
||||
// CEF string maps are a set of key/value string pairs.
|
||||
typedef void* cef_string_list_t;
|
||||
|
||||
// Allocate a new string map.
|
||||
CEF_EXPORT cef_string_list_t cef_string_list_alloc();
|
||||
|
||||
// Return the number of elements in the string list.
|
||||
CEF_EXPORT int cef_string_list_size(cef_string_list_t list);
|
||||
|
||||
// Return the value at the specified zero-based string list index.
|
||||
CEF_EXPORT cef_string_t cef_string_list_value(cef_string_list_t list, int index);
|
||||
|
||||
// Append a new key/value pair at the end of the string list.
|
||||
CEF_EXPORT void cef_string_list_append(cef_string_list_t list, const wchar_t* value);
|
||||
|
||||
// Clear the string list.
|
||||
CEF_EXPORT void cef_string_list_clear(cef_string_list_t list);
|
||||
|
||||
// Free the string list.
|
||||
CEF_EXPORT void cef_string_list_free(cef_string_list_t list);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _CEF_STRING_LIST_H
|
||||
// Copyright (c) 2009 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#ifndef _CEF_STRING_LIST_H
|
||||
#define _CEF_STRING_LIST_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "cef_export.h"
|
||||
#include "cef_string.h"
|
||||
#include <wchar.h>
|
||||
|
||||
// CEF string maps are a set of key/value string pairs.
|
||||
typedef void* cef_string_list_t;
|
||||
|
||||
// Allocate a new string map.
|
||||
CEF_EXPORT cef_string_list_t cef_string_list_alloc();
|
||||
|
||||
// Return the number of elements in the string list.
|
||||
CEF_EXPORT int cef_string_list_size(cef_string_list_t list);
|
||||
|
||||
// Return the value at the specified zero-based string list index.
|
||||
CEF_EXPORT cef_string_t cef_string_list_value(cef_string_list_t list, int index);
|
||||
|
||||
// Append a new key/value pair at the end of the string list.
|
||||
CEF_EXPORT void cef_string_list_append(cef_string_list_t list, const wchar_t* value);
|
||||
|
||||
// Clear the string list.
|
||||
CEF_EXPORT void cef_string_list_clear(cef_string_list_t list);
|
||||
|
||||
// Free the string list.
|
||||
CEF_EXPORT void cef_string_list_free(cef_string_list_t list);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _CEF_STRING_LIST_H
|
||||
|
@@ -1,75 +1,75 @@
|
||||
// Copyright (c) 2009 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#ifndef _CEF_STRING_MAP_H
|
||||
#define _CEF_STRING_MAP_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "cef_export.h"
|
||||
#include "cef_string.h"
|
||||
#include <wchar.h>
|
||||
|
||||
// CEF string maps are a set of key/value string pairs.
|
||||
typedef void* cef_string_map_t;
|
||||
|
||||
// Allocate a new string map.
|
||||
CEF_EXPORT cef_string_map_t cef_string_map_alloc();
|
||||
|
||||
// Return the number of elements in the string map.
|
||||
CEF_EXPORT int cef_string_map_size(cef_string_map_t map);
|
||||
|
||||
// Return the value assigned to the specified key.
|
||||
CEF_EXPORT cef_string_t cef_string_map_find(cef_string_map_t map,
|
||||
const wchar_t* key);
|
||||
|
||||
// Return the key at the specified zero-based string map index.
|
||||
CEF_EXPORT cef_string_t cef_string_map_key(cef_string_map_t map, int index);
|
||||
|
||||
// Return the value at the specified zero-based string map index.
|
||||
CEF_EXPORT cef_string_t cef_string_map_value(cef_string_map_t map, int index);
|
||||
|
||||
// Append a new key/value pair at the end of the string map.
|
||||
CEF_EXPORT void cef_string_map_append(cef_string_map_t map, const wchar_t* key,
|
||||
const wchar_t* value);
|
||||
|
||||
// Clear the string map.
|
||||
CEF_EXPORT void cef_string_map_clear(cef_string_map_t map);
|
||||
|
||||
// Free the string map.
|
||||
CEF_EXPORT void cef_string_map_free(cef_string_map_t map);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _CEF_STRING_MAP_H
|
||||
// Copyright (c) 2009 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#ifndef _CEF_STRING_MAP_H
|
||||
#define _CEF_STRING_MAP_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "cef_export.h"
|
||||
#include "cef_string.h"
|
||||
#include <wchar.h>
|
||||
|
||||
// CEF string maps are a set of key/value string pairs.
|
||||
typedef void* cef_string_map_t;
|
||||
|
||||
// Allocate a new string map.
|
||||
CEF_EXPORT cef_string_map_t cef_string_map_alloc();
|
||||
|
||||
// Return the number of elements in the string map.
|
||||
CEF_EXPORT int cef_string_map_size(cef_string_map_t map);
|
||||
|
||||
// Return the value assigned to the specified key.
|
||||
CEF_EXPORT cef_string_t cef_string_map_find(cef_string_map_t map,
|
||||
const wchar_t* key);
|
||||
|
||||
// Return the key at the specified zero-based string map index.
|
||||
CEF_EXPORT cef_string_t cef_string_map_key(cef_string_map_t map, int index);
|
||||
|
||||
// Return the value at the specified zero-based string map index.
|
||||
CEF_EXPORT cef_string_t cef_string_map_value(cef_string_map_t map, int index);
|
||||
|
||||
// Append a new key/value pair at the end of the string map.
|
||||
CEF_EXPORT void cef_string_map_append(cef_string_map_t map, const wchar_t* key,
|
||||
const wchar_t* value);
|
||||
|
||||
// Clear the string map.
|
||||
CEF_EXPORT void cef_string_map_clear(cef_string_map_t map);
|
||||
|
||||
// Free the string map.
|
||||
CEF_EXPORT void cef_string_map_free(cef_string_map_t map);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _CEF_STRING_MAP_H
|
||||
|
@@ -1,297 +1,297 @@
|
||||
// Copyright (c) 2009 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
#ifndef _CEF_TYPES_H
|
||||
#define _CEF_TYPES_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
// Bring in platform-specific definitions.
|
||||
#ifdef _WIN32
|
||||
#include "cef_types_win.h"
|
||||
#endif
|
||||
|
||||
|
||||
// Define handler return value types. Returning RV_HANDLED indicates
|
||||
// that the implementation completely handled the method and that no further
|
||||
// processing is required. Returning RV_CONTINUE indicates that the
|
||||
// implementation did not handle the method and that the default handler
|
||||
// should be called.
|
||||
enum cef_retval_t
|
||||
{
|
||||
RV_HANDLED = 0,
|
||||
RV_CONTINUE = 1,
|
||||
};
|
||||
|
||||
// Various browser navigation types supported by chrome.
|
||||
enum cef_handler_navtype_t
|
||||
{
|
||||
NAVTYPE_LINKCLICKED = 0,
|
||||
NAVTYPE_FORMSUBMITTED,
|
||||
NAVTYPE_BACKFORWARD,
|
||||
NAVTYPE_RELOAD,
|
||||
NAVTYPE_FORMRESUBMITTED,
|
||||
NAVTYPE_OTHER,
|
||||
};
|
||||
|
||||
// Supported error code values. See net\base\net_error_list.h for complete
|
||||
// descriptions of the error codes.
|
||||
enum cef_handler_errorcode_t
|
||||
{
|
||||
ERR_FAILED = -2,
|
||||
ERR_ABORTED = -3,
|
||||
ERR_INVALID_ARGUMENT = -4,
|
||||
ERR_INVALID_HANDLE = -5,
|
||||
ERR_FILE_NOT_FOUND = -6,
|
||||
ERR_TIMED_OUT = -7,
|
||||
ERR_FILE_TOO_BIG = -8,
|
||||
ERR_UNEXPECTED = -9,
|
||||
ERR_ACCESS_DENIED = -10,
|
||||
ERR_NOT_IMPLEMENTED = -11,
|
||||
ERR_CONNECTION_CLOSED = -100,
|
||||
ERR_CONNECTION_RESET = -101,
|
||||
ERR_CONNECTION_REFUSED = -102,
|
||||
ERR_CONNECTION_ABORTED = -103,
|
||||
ERR_CONNECTION_FAILED = -104,
|
||||
ERR_NAME_NOT_RESOLVED = -105,
|
||||
ERR_INTERNET_DISCONNECTED = -106,
|
||||
ERR_SSL_PROTOCOL_ERROR = -107,
|
||||
ERR_ADDRESS_INVALID = -108,
|
||||
ERR_ADDRESS_UNREACHABLE = -109,
|
||||
ERR_SSL_CLIENT_AUTH_CERT_NEEDED = -110,
|
||||
ERR_TUNNEL_CONNECTION_FAILED = -111,
|
||||
ERR_NO_SSL_VERSIONS_ENABLED = -112,
|
||||
ERR_SSL_VERSION_OR_CIPHER_MISMATCH = -113,
|
||||
ERR_SSL_RENEGOTIATION_REQUESTED = -114,
|
||||
ERR_CERT_COMMON_NAME_INVALID = -200,
|
||||
ERR_CERT_DATE_INVALID = -201,
|
||||
ERR_CERT_AUTHORITY_INVALID = -202,
|
||||
ERR_CERT_CONTAINS_ERRORS = -203,
|
||||
ERR_CERT_NO_REVOCATION_MECHANISM = -204,
|
||||
ERR_CERT_UNABLE_TO_CHECK_REVOCATION = -205,
|
||||
ERR_CERT_REVOKED = -206,
|
||||
ERR_CERT_INVALID = -207,
|
||||
ERR_CERT_END = -208,
|
||||
ERR_INVALID_URL = -300,
|
||||
ERR_DISALLOWED_URL_SCHEME = -301,
|
||||
ERR_UNKNOWN_URL_SCHEME = -302,
|
||||
ERR_TOO_MANY_REDIRECTS = -310,
|
||||
ERR_UNSAFE_REDIRECT = -311,
|
||||
ERR_UNSAFE_PORT = -312,
|
||||
ERR_INVALID_RESPONSE = -320,
|
||||
ERR_INVALID_CHUNKED_ENCODING = -321,
|
||||
ERR_METHOD_NOT_SUPPORTED = -322,
|
||||
ERR_UNEXPECTED_PROXY_AUTH = -323,
|
||||
ERR_EMPTY_RESPONSE = -324,
|
||||
ERR_RESPONSE_HEADERS_TOO_BIG = -325,
|
||||
ERR_CACHE_MISS = -400,
|
||||
ERR_INSECURE_RESPONSE = -501,
|
||||
};
|
||||
|
||||
// Structure representing menu information.
|
||||
typedef struct _cef_handler_menuinfo_t
|
||||
{
|
||||
int typeFlags;
|
||||
int x;
|
||||
int y;
|
||||
const wchar_t* linkUrl;
|
||||
const wchar_t* imageUrl;
|
||||
const wchar_t* pageUrl;
|
||||
const wchar_t* frameUrl;
|
||||
const wchar_t* selectionText;
|
||||
const wchar_t* misspelledWord;
|
||||
int editFlags;
|
||||
const wchar_t* securityInfo;
|
||||
} cef_handler_menuinfo_t;
|
||||
|
||||
// The cef_handler_menuinfo_t typeFlags value will be a combination of the
|
||||
// following values.
|
||||
enum cef_handler_menutypebits_t
|
||||
{
|
||||
// No node is selected
|
||||
MENUTYPE_NONE = 0x0,
|
||||
// The top page is selected
|
||||
MENUTYPE_PAGE = 0x1,
|
||||
// A subframe page is selected
|
||||
MENUTYPE_FRAME = 0x2,
|
||||
// A link is selected
|
||||
MENUTYPE_LINK = 0x4,
|
||||
// An image is selected
|
||||
MENUTYPE_IMAGE = 0x8,
|
||||
// There is a textual or mixed selection that is selected
|
||||
MENUTYPE_SELECTION = 0x10,
|
||||
// An editable element is selected
|
||||
MENUTYPE_EDITABLE = 0x20,
|
||||
// A misspelled word is selected
|
||||
MENUTYPE_MISSPELLED_WORD = 0x40,
|
||||
// A video node is selected
|
||||
MENUTYPE_VIDEO = 0x80,
|
||||
// A video node is selected
|
||||
MENUTYPE_AUDIO = 0x100,
|
||||
};
|
||||
|
||||
// The cef_handler_menuinfo_t editFlags value will be a combination of the
|
||||
// following values.
|
||||
enum cef_handler_menucapabilitybits_t
|
||||
{
|
||||
// Values from WebContextMenuData::EditFlags in WebContextMenuData.h
|
||||
MENU_CAN_DO_NONE = 0x0,
|
||||
MENU_CAN_UNDO = 0x1,
|
||||
MENU_CAN_REDO = 0x2,
|
||||
MENU_CAN_CUT = 0x4,
|
||||
MENU_CAN_COPY = 0x8,
|
||||
MENU_CAN_PASTE = 0x10,
|
||||
MENU_CAN_DELETE = 0x20,
|
||||
MENU_CAN_SELECT_ALL = 0x40,
|
||||
MENU_CAN_TRANSLATE = 0x80,
|
||||
// Values unique to CEF
|
||||
MENU_CAN_GO_FORWARD = 0x10000000,
|
||||
MENU_CAN_GO_BACK = 0x20000000,
|
||||
};
|
||||
|
||||
// Supported menu ID values.
|
||||
enum cef_handler_menuid_t
|
||||
{
|
||||
MENU_ID_NAV_BACK = 10,
|
||||
MENU_ID_NAV_FORWARD = 11,
|
||||
MENU_ID_NAV_RELOAD = 12,
|
||||
MENU_ID_NAV_RELOAD_NOCACHE = 13,
|
||||
MENU_ID_NAV_STOP = 14,
|
||||
MENU_ID_UNDO = 20,
|
||||
MENU_ID_REDO = 21,
|
||||
MENU_ID_CUT = 22,
|
||||
MENU_ID_COPY = 23,
|
||||
MENU_ID_PASTE = 24,
|
||||
MENU_ID_DELETE = 25,
|
||||
MENU_ID_SELECTALL = 26,
|
||||
MENU_ID_PRINT = 30,
|
||||
MENU_ID_VIEWSOURCE = 31,
|
||||
};
|
||||
|
||||
// Post data elements may represent either bytes or files.
|
||||
enum cef_postdataelement_type_t
|
||||
{
|
||||
PDE_TYPE_EMPTY = 0,
|
||||
PDE_TYPE_BYTES,
|
||||
PDE_TYPE_FILE,
|
||||
};
|
||||
|
||||
// Key event types.
|
||||
enum cef_handler_keyevent_type_t
|
||||
{
|
||||
KEYEVENT_RAWKEYDOWN = 0,
|
||||
KEYEVENT_KEYDOWN,
|
||||
KEYEVENT_KEYUP,
|
||||
KEYEVENT_CHAR
|
||||
};
|
||||
|
||||
// Key event modifiers.
|
||||
enum cef_handler_keyevent_modifiers_t
|
||||
{
|
||||
KEY_SHIFT = 1 << 0,
|
||||
KEY_CTRL = 1 << 1,
|
||||
KEY_ALT = 1 << 2,
|
||||
KEY_META = 1 << 3
|
||||
};
|
||||
|
||||
// Structure representing a rectangle.
|
||||
typedef struct _cef_rect_t
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
int width;
|
||||
int height;
|
||||
} cef_rect_t;
|
||||
|
||||
// Existing thread IDs.
|
||||
enum cef_thread_id_t
|
||||
{
|
||||
TID_UI = 0,
|
||||
TID_IO = 1,
|
||||
TID_FILE = 2,
|
||||
};
|
||||
|
||||
// Paper type for printing.
|
||||
enum cef_paper_type_t
|
||||
{
|
||||
PT_LETTER = 0,
|
||||
PT_LEGAL,
|
||||
PT_EXECUTIVE,
|
||||
PT_A3,
|
||||
PT_A4,
|
||||
PT_CUSTOM
|
||||
};
|
||||
|
||||
// Paper metric information for printing.
|
||||
struct cef_paper_metrics
|
||||
{
|
||||
enum cef_paper_type_t paper_type;
|
||||
//Length and width needed if paper_type is custom_size
|
||||
//Units are in inches.
|
||||
double length;
|
||||
double width;
|
||||
};
|
||||
|
||||
// Paper print margins.
|
||||
struct cef_print_margins
|
||||
{
|
||||
//Margin size in inches for left/right/top/bottom (this is content margins).
|
||||
double left;
|
||||
double right;
|
||||
double top;
|
||||
double bottom;
|
||||
//Margin size (top/bottom) in inches for header/footer.
|
||||
double header;
|
||||
double footer;
|
||||
};
|
||||
|
||||
// Page orientation for printing
|
||||
enum cef_page_orientation
|
||||
{
|
||||
PORTRAIT = 0,
|
||||
LANDSCAPE
|
||||
};
|
||||
|
||||
// Printing options.
|
||||
typedef struct _cef_print_options_t
|
||||
{
|
||||
enum cef_page_orientation page_orientation;
|
||||
struct cef_paper_metrics paper_metrics;
|
||||
struct cef_print_margins paper_margins;
|
||||
} cef_print_options_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _CEF_TYPES_H
|
||||
// Copyright (c) 2009 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
#ifndef _CEF_TYPES_H
|
||||
#define _CEF_TYPES_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
// Bring in platform-specific definitions.
|
||||
#ifdef _WIN32
|
||||
#include "cef_types_win.h"
|
||||
#endif
|
||||
|
||||
|
||||
// Define handler return value types. Returning RV_HANDLED indicates
|
||||
// that the implementation completely handled the method and that no further
|
||||
// processing is required. Returning RV_CONTINUE indicates that the
|
||||
// implementation did not handle the method and that the default handler
|
||||
// should be called.
|
||||
enum cef_retval_t
|
||||
{
|
||||
RV_HANDLED = 0,
|
||||
RV_CONTINUE = 1,
|
||||
};
|
||||
|
||||
// Various browser navigation types supported by chrome.
|
||||
enum cef_handler_navtype_t
|
||||
{
|
||||
NAVTYPE_LINKCLICKED = 0,
|
||||
NAVTYPE_FORMSUBMITTED,
|
||||
NAVTYPE_BACKFORWARD,
|
||||
NAVTYPE_RELOAD,
|
||||
NAVTYPE_FORMRESUBMITTED,
|
||||
NAVTYPE_OTHER,
|
||||
};
|
||||
|
||||
// Supported error code values. See net\base\net_error_list.h for complete
|
||||
// descriptions of the error codes.
|
||||
enum cef_handler_errorcode_t
|
||||
{
|
||||
ERR_FAILED = -2,
|
||||
ERR_ABORTED = -3,
|
||||
ERR_INVALID_ARGUMENT = -4,
|
||||
ERR_INVALID_HANDLE = -5,
|
||||
ERR_FILE_NOT_FOUND = -6,
|
||||
ERR_TIMED_OUT = -7,
|
||||
ERR_FILE_TOO_BIG = -8,
|
||||
ERR_UNEXPECTED = -9,
|
||||
ERR_ACCESS_DENIED = -10,
|
||||
ERR_NOT_IMPLEMENTED = -11,
|
||||
ERR_CONNECTION_CLOSED = -100,
|
||||
ERR_CONNECTION_RESET = -101,
|
||||
ERR_CONNECTION_REFUSED = -102,
|
||||
ERR_CONNECTION_ABORTED = -103,
|
||||
ERR_CONNECTION_FAILED = -104,
|
||||
ERR_NAME_NOT_RESOLVED = -105,
|
||||
ERR_INTERNET_DISCONNECTED = -106,
|
||||
ERR_SSL_PROTOCOL_ERROR = -107,
|
||||
ERR_ADDRESS_INVALID = -108,
|
||||
ERR_ADDRESS_UNREACHABLE = -109,
|
||||
ERR_SSL_CLIENT_AUTH_CERT_NEEDED = -110,
|
||||
ERR_TUNNEL_CONNECTION_FAILED = -111,
|
||||
ERR_NO_SSL_VERSIONS_ENABLED = -112,
|
||||
ERR_SSL_VERSION_OR_CIPHER_MISMATCH = -113,
|
||||
ERR_SSL_RENEGOTIATION_REQUESTED = -114,
|
||||
ERR_CERT_COMMON_NAME_INVALID = -200,
|
||||
ERR_CERT_DATE_INVALID = -201,
|
||||
ERR_CERT_AUTHORITY_INVALID = -202,
|
||||
ERR_CERT_CONTAINS_ERRORS = -203,
|
||||
ERR_CERT_NO_REVOCATION_MECHANISM = -204,
|
||||
ERR_CERT_UNABLE_TO_CHECK_REVOCATION = -205,
|
||||
ERR_CERT_REVOKED = -206,
|
||||
ERR_CERT_INVALID = -207,
|
||||
ERR_CERT_END = -208,
|
||||
ERR_INVALID_URL = -300,
|
||||
ERR_DISALLOWED_URL_SCHEME = -301,
|
||||
ERR_UNKNOWN_URL_SCHEME = -302,
|
||||
ERR_TOO_MANY_REDIRECTS = -310,
|
||||
ERR_UNSAFE_REDIRECT = -311,
|
||||
ERR_UNSAFE_PORT = -312,
|
||||
ERR_INVALID_RESPONSE = -320,
|
||||
ERR_INVALID_CHUNKED_ENCODING = -321,
|
||||
ERR_METHOD_NOT_SUPPORTED = -322,
|
||||
ERR_UNEXPECTED_PROXY_AUTH = -323,
|
||||
ERR_EMPTY_RESPONSE = -324,
|
||||
ERR_RESPONSE_HEADERS_TOO_BIG = -325,
|
||||
ERR_CACHE_MISS = -400,
|
||||
ERR_INSECURE_RESPONSE = -501,
|
||||
};
|
||||
|
||||
// Structure representing menu information.
|
||||
typedef struct _cef_handler_menuinfo_t
|
||||
{
|
||||
int typeFlags;
|
||||
int x;
|
||||
int y;
|
||||
const wchar_t* linkUrl;
|
||||
const wchar_t* imageUrl;
|
||||
const wchar_t* pageUrl;
|
||||
const wchar_t* frameUrl;
|
||||
const wchar_t* selectionText;
|
||||
const wchar_t* misspelledWord;
|
||||
int editFlags;
|
||||
const wchar_t* securityInfo;
|
||||
} cef_handler_menuinfo_t;
|
||||
|
||||
// The cef_handler_menuinfo_t typeFlags value will be a combination of the
|
||||
// following values.
|
||||
enum cef_handler_menutypebits_t
|
||||
{
|
||||
// No node is selected
|
||||
MENUTYPE_NONE = 0x0,
|
||||
// The top page is selected
|
||||
MENUTYPE_PAGE = 0x1,
|
||||
// A subframe page is selected
|
||||
MENUTYPE_FRAME = 0x2,
|
||||
// A link is selected
|
||||
MENUTYPE_LINK = 0x4,
|
||||
// An image is selected
|
||||
MENUTYPE_IMAGE = 0x8,
|
||||
// There is a textual or mixed selection that is selected
|
||||
MENUTYPE_SELECTION = 0x10,
|
||||
// An editable element is selected
|
||||
MENUTYPE_EDITABLE = 0x20,
|
||||
// A misspelled word is selected
|
||||
MENUTYPE_MISSPELLED_WORD = 0x40,
|
||||
// A video node is selected
|
||||
MENUTYPE_VIDEO = 0x80,
|
||||
// A video node is selected
|
||||
MENUTYPE_AUDIO = 0x100,
|
||||
};
|
||||
|
||||
// The cef_handler_menuinfo_t editFlags value will be a combination of the
|
||||
// following values.
|
||||
enum cef_handler_menucapabilitybits_t
|
||||
{
|
||||
// Values from WebContextMenuData::EditFlags in WebContextMenuData.h
|
||||
MENU_CAN_DO_NONE = 0x0,
|
||||
MENU_CAN_UNDO = 0x1,
|
||||
MENU_CAN_REDO = 0x2,
|
||||
MENU_CAN_CUT = 0x4,
|
||||
MENU_CAN_COPY = 0x8,
|
||||
MENU_CAN_PASTE = 0x10,
|
||||
MENU_CAN_DELETE = 0x20,
|
||||
MENU_CAN_SELECT_ALL = 0x40,
|
||||
MENU_CAN_TRANSLATE = 0x80,
|
||||
// Values unique to CEF
|
||||
MENU_CAN_GO_FORWARD = 0x10000000,
|
||||
MENU_CAN_GO_BACK = 0x20000000,
|
||||
};
|
||||
|
||||
// Supported menu ID values.
|
||||
enum cef_handler_menuid_t
|
||||
{
|
||||
MENU_ID_NAV_BACK = 10,
|
||||
MENU_ID_NAV_FORWARD = 11,
|
||||
MENU_ID_NAV_RELOAD = 12,
|
||||
MENU_ID_NAV_RELOAD_NOCACHE = 13,
|
||||
MENU_ID_NAV_STOP = 14,
|
||||
MENU_ID_UNDO = 20,
|
||||
MENU_ID_REDO = 21,
|
||||
MENU_ID_CUT = 22,
|
||||
MENU_ID_COPY = 23,
|
||||
MENU_ID_PASTE = 24,
|
||||
MENU_ID_DELETE = 25,
|
||||
MENU_ID_SELECTALL = 26,
|
||||
MENU_ID_PRINT = 30,
|
||||
MENU_ID_VIEWSOURCE = 31,
|
||||
};
|
||||
|
||||
// Post data elements may represent either bytes or files.
|
||||
enum cef_postdataelement_type_t
|
||||
{
|
||||
PDE_TYPE_EMPTY = 0,
|
||||
PDE_TYPE_BYTES,
|
||||
PDE_TYPE_FILE,
|
||||
};
|
||||
|
||||
// Key event types.
|
||||
enum cef_handler_keyevent_type_t
|
||||
{
|
||||
KEYEVENT_RAWKEYDOWN = 0,
|
||||
KEYEVENT_KEYDOWN,
|
||||
KEYEVENT_KEYUP,
|
||||
KEYEVENT_CHAR
|
||||
};
|
||||
|
||||
// Key event modifiers.
|
||||
enum cef_handler_keyevent_modifiers_t
|
||||
{
|
||||
KEY_SHIFT = 1 << 0,
|
||||
KEY_CTRL = 1 << 1,
|
||||
KEY_ALT = 1 << 2,
|
||||
KEY_META = 1 << 3
|
||||
};
|
||||
|
||||
// Structure representing a rectangle.
|
||||
typedef struct _cef_rect_t
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
int width;
|
||||
int height;
|
||||
} cef_rect_t;
|
||||
|
||||
// Existing thread IDs.
|
||||
enum cef_thread_id_t
|
||||
{
|
||||
TID_UI = 0,
|
||||
TID_IO = 1,
|
||||
TID_FILE = 2,
|
||||
};
|
||||
|
||||
// Paper type for printing.
|
||||
enum cef_paper_type_t
|
||||
{
|
||||
PT_LETTER = 0,
|
||||
PT_LEGAL,
|
||||
PT_EXECUTIVE,
|
||||
PT_A3,
|
||||
PT_A4,
|
||||
PT_CUSTOM
|
||||
};
|
||||
|
||||
// Paper metric information for printing.
|
||||
struct cef_paper_metrics
|
||||
{
|
||||
enum cef_paper_type_t paper_type;
|
||||
//Length and width needed if paper_type is custom_size
|
||||
//Units are in inches.
|
||||
double length;
|
||||
double width;
|
||||
};
|
||||
|
||||
// Paper print margins.
|
||||
struct cef_print_margins
|
||||
{
|
||||
//Margin size in inches for left/right/top/bottom (this is content margins).
|
||||
double left;
|
||||
double right;
|
||||
double top;
|
||||
double bottom;
|
||||
//Margin size (top/bottom) in inches for header/footer.
|
||||
double header;
|
||||
double footer;
|
||||
};
|
||||
|
||||
// Page orientation for printing
|
||||
enum cef_page_orientation
|
||||
{
|
||||
PORTRAIT = 0,
|
||||
LANDSCAPE
|
||||
};
|
||||
|
||||
// Printing options.
|
||||
typedef struct _cef_print_options_t
|
||||
{
|
||||
enum cef_page_orientation page_orientation;
|
||||
struct cef_paper_metrics paper_metrics;
|
||||
struct cef_print_margins paper_margins;
|
||||
} cef_print_options_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _CEF_TYPES_H
|
||||
|
@@ -1,76 +1,76 @@
|
||||
// Copyright (c) 2009 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
#ifndef _CEF_TYPES_WIN_H
|
||||
#define _CEF_TYPES_WIN_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include "cef_string.h"
|
||||
|
||||
// Class representing window information.
|
||||
typedef struct _cef_window_info_t
|
||||
{
|
||||
// Standard parameters required by CreateWindowEx()
|
||||
DWORD m_dwExStyle;
|
||||
cef_string_t m_windowName;
|
||||
DWORD m_dwStyle;
|
||||
int m_x;
|
||||
int m_y;
|
||||
int m_nWidth;
|
||||
int m_nHeight;
|
||||
HWND m_hWndParent;
|
||||
HMENU m_hMenu;
|
||||
|
||||
// Handle for the new browser window.
|
||||
HWND m_hWnd;
|
||||
} cef_window_info_t;
|
||||
|
||||
// Class representing print context information.
|
||||
typedef struct _cef_print_info_t
|
||||
{
|
||||
HDC m_hDC;
|
||||
RECT m_Rect;
|
||||
double m_Scale;
|
||||
} cef_print_info_t;
|
||||
|
||||
// Window handle.
|
||||
#define cef_window_handle_t HWND
|
||||
#endif // _WIN32
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _CEF_TYPES_WIN_H
|
||||
// Copyright (c) 2009 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
#ifndef _CEF_TYPES_WIN_H
|
||||
#define _CEF_TYPES_WIN_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include "cef_string.h"
|
||||
|
||||
// Class representing window information.
|
||||
typedef struct _cef_window_info_t
|
||||
{
|
||||
// Standard parameters required by CreateWindowEx()
|
||||
DWORD m_dwExStyle;
|
||||
cef_string_t m_windowName;
|
||||
DWORD m_dwStyle;
|
||||
int m_x;
|
||||
int m_y;
|
||||
int m_nWidth;
|
||||
int m_nHeight;
|
||||
HWND m_hWndParent;
|
||||
HMENU m_hMenu;
|
||||
|
||||
// Handle for the new browser window.
|
||||
HWND m_hWnd;
|
||||
} cef_window_info_t;
|
||||
|
||||
// Class representing print context information.
|
||||
typedef struct _cef_print_info_t
|
||||
{
|
||||
HDC m_hDC;
|
||||
RECT m_Rect;
|
||||
double m_Scale;
|
||||
} cef_print_info_t;
|
||||
|
||||
// Window handle.
|
||||
#define cef_window_handle_t HWND
|
||||
#endif // _WIN32
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _CEF_TYPES_WIN_H
|
||||
|
@@ -1,209 +1,209 @@
|
||||
// Copyright (c) 2008 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
#ifndef _CEF_WIN_H
|
||||
#define _CEF_WIN_H
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include "cef_types_win.h"
|
||||
|
||||
// Atomic increment and decrement.
|
||||
#define CefAtomicIncrement(p) InterlockedIncrement(p)
|
||||
#define CefAtomicDecrement(p) InterlockedDecrement(p)
|
||||
|
||||
// Critical section wrapper.
|
||||
class CefCriticalSection
|
||||
{
|
||||
public:
|
||||
CefCriticalSection()
|
||||
{
|
||||
memset(&m_sec, 0, sizeof(CRITICAL_SECTION));
|
||||
InitializeCriticalSection(&m_sec);
|
||||
}
|
||||
~CefCriticalSection()
|
||||
{
|
||||
DeleteCriticalSection(&m_sec);
|
||||
}
|
||||
void Lock()
|
||||
{
|
||||
EnterCriticalSection(&m_sec);
|
||||
}
|
||||
void Unlock()
|
||||
{
|
||||
LeaveCriticalSection(&m_sec);
|
||||
}
|
||||
|
||||
CRITICAL_SECTION m_sec;
|
||||
};
|
||||
|
||||
// Class representing window information.
|
||||
class CefWindowInfo : public cef_window_info_t
|
||||
{
|
||||
public:
|
||||
CefWindowInfo()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
~CefWindowInfo()
|
||||
{
|
||||
if(m_windowName)
|
||||
cef_string_free(m_windowName);
|
||||
}
|
||||
|
||||
CefWindowInfo(const CefWindowInfo& r)
|
||||
{
|
||||
Init();
|
||||
*this = r;
|
||||
}
|
||||
CefWindowInfo(const cef_window_info_t& r)
|
||||
{
|
||||
Init();
|
||||
*this = r;
|
||||
}
|
||||
|
||||
void Init()
|
||||
{
|
||||
m_dwExStyle = 0;
|
||||
m_windowName = NULL;
|
||||
m_dwStyle = 0;
|
||||
m_x = 0;
|
||||
m_y = 0;
|
||||
m_nWidth = 0;
|
||||
m_nHeight = 0;
|
||||
m_hWndParent = NULL;
|
||||
m_hMenu = 0;
|
||||
m_hWnd = NULL;
|
||||
}
|
||||
|
||||
CefWindowInfo& operator=(const CefWindowInfo& r)
|
||||
{
|
||||
return operator=(static_cast<const cef_window_info_t&>(r));
|
||||
}
|
||||
CefWindowInfo& operator=(const cef_window_info_t& r)
|
||||
{
|
||||
m_dwExStyle = r.m_dwExStyle;
|
||||
if(m_windowName)
|
||||
cef_string_free(m_windowName);
|
||||
if(r.m_windowName)
|
||||
m_windowName = cef_string_alloc(r.m_windowName);
|
||||
else
|
||||
m_windowName = NULL;
|
||||
m_dwStyle = r.m_dwStyle;
|
||||
m_x = r.m_x;
|
||||
m_y = r.m_y;
|
||||
m_nWidth = r.m_nWidth;
|
||||
m_nHeight = r.m_nHeight;
|
||||
m_hWndParent = r.m_hWndParent;
|
||||
m_hMenu = r.m_hMenu;
|
||||
m_hWnd = r.m_hWnd;
|
||||
return *this;
|
||||
}
|
||||
|
||||
void SetAsChild(HWND hWndParent, RECT windowRect)
|
||||
{
|
||||
m_dwStyle = WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN
|
||||
| WS_CLIPSIBLINGS | WS_TABSTOP;
|
||||
m_hWndParent = hWndParent;
|
||||
m_x = windowRect.left;
|
||||
m_y = windowRect.top;
|
||||
m_nWidth = windowRect.right - windowRect.left;
|
||||
m_nHeight = windowRect.bottom - windowRect.top;
|
||||
}
|
||||
|
||||
void SetAsPopup(HWND hWndParent, LPCWSTR windowName)
|
||||
{
|
||||
m_dwStyle = WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS;
|
||||
m_hWndParent = hWndParent;
|
||||
m_x = CW_USEDEFAULT;
|
||||
m_y = CW_USEDEFAULT;
|
||||
m_nWidth = CW_USEDEFAULT;
|
||||
m_nHeight = CW_USEDEFAULT;
|
||||
|
||||
if(m_windowName)
|
||||
cef_string_free(m_windowName);
|
||||
if(windowName)
|
||||
m_windowName = cef_string_alloc(windowName);
|
||||
else
|
||||
m_windowName = NULL;
|
||||
}
|
||||
};
|
||||
|
||||
// Class representing print context information.
|
||||
class CefPrintInfo : public cef_print_info_t
|
||||
{
|
||||
public:
|
||||
CefPrintInfo()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
~CefPrintInfo()
|
||||
{
|
||||
}
|
||||
|
||||
CefPrintInfo(const CefPrintInfo& r)
|
||||
{
|
||||
Init();
|
||||
*this = r;
|
||||
}
|
||||
CefPrintInfo(const cef_print_info_t& r)
|
||||
{
|
||||
Init();
|
||||
*this = r;
|
||||
}
|
||||
|
||||
void Init()
|
||||
{
|
||||
m_hDC = NULL;
|
||||
m_Rect.left = m_Rect.right = m_Rect.top = m_Rect.bottom = 0;
|
||||
m_Scale = 0;
|
||||
}
|
||||
|
||||
CefPrintInfo& operator=(const CefPrintInfo& r)
|
||||
{
|
||||
return operator=(static_cast<const cef_print_info_t&>(r));
|
||||
}
|
||||
CefPrintInfo& operator=(const cef_print_info_t& r)
|
||||
{
|
||||
m_hDC = r.m_hDC;
|
||||
m_Rect.left = r.m_Rect.left;
|
||||
m_Rect.right = r.m_Rect.right;
|
||||
m_Rect.top = r.m_Rect.top;
|
||||
m_Rect.bottom = r.m_Rect.bottom;
|
||||
m_Scale = r.m_Scale;
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
// Window handle.
|
||||
#define CefWindowHandle cef_window_handle_t
|
||||
#endif // _WIN32
|
||||
|
||||
#endif // _CEF_WIN_H
|
||||
// Copyright (c) 2008 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
#ifndef _CEF_WIN_H
|
||||
#define _CEF_WIN_H
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include "cef_types_win.h"
|
||||
|
||||
// Atomic increment and decrement.
|
||||
#define CefAtomicIncrement(p) InterlockedIncrement(p)
|
||||
#define CefAtomicDecrement(p) InterlockedDecrement(p)
|
||||
|
||||
// Critical section wrapper.
|
||||
class CefCriticalSection
|
||||
{
|
||||
public:
|
||||
CefCriticalSection()
|
||||
{
|
||||
memset(&m_sec, 0, sizeof(CRITICAL_SECTION));
|
||||
InitializeCriticalSection(&m_sec);
|
||||
}
|
||||
~CefCriticalSection()
|
||||
{
|
||||
DeleteCriticalSection(&m_sec);
|
||||
}
|
||||
void Lock()
|
||||
{
|
||||
EnterCriticalSection(&m_sec);
|
||||
}
|
||||
void Unlock()
|
||||
{
|
||||
LeaveCriticalSection(&m_sec);
|
||||
}
|
||||
|
||||
CRITICAL_SECTION m_sec;
|
||||
};
|
||||
|
||||
// Class representing window information.
|
||||
class CefWindowInfo : public cef_window_info_t
|
||||
{
|
||||
public:
|
||||
CefWindowInfo()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
~CefWindowInfo()
|
||||
{
|
||||
if(m_windowName)
|
||||
cef_string_free(m_windowName);
|
||||
}
|
||||
|
||||
CefWindowInfo(const CefWindowInfo& r)
|
||||
{
|
||||
Init();
|
||||
*this = r;
|
||||
}
|
||||
CefWindowInfo(const cef_window_info_t& r)
|
||||
{
|
||||
Init();
|
||||
*this = r;
|
||||
}
|
||||
|
||||
void Init()
|
||||
{
|
||||
m_dwExStyle = 0;
|
||||
m_windowName = NULL;
|
||||
m_dwStyle = 0;
|
||||
m_x = 0;
|
||||
m_y = 0;
|
||||
m_nWidth = 0;
|
||||
m_nHeight = 0;
|
||||
m_hWndParent = NULL;
|
||||
m_hMenu = 0;
|
||||
m_hWnd = NULL;
|
||||
}
|
||||
|
||||
CefWindowInfo& operator=(const CefWindowInfo& r)
|
||||
{
|
||||
return operator=(static_cast<const cef_window_info_t&>(r));
|
||||
}
|
||||
CefWindowInfo& operator=(const cef_window_info_t& r)
|
||||
{
|
||||
m_dwExStyle = r.m_dwExStyle;
|
||||
if(m_windowName)
|
||||
cef_string_free(m_windowName);
|
||||
if(r.m_windowName)
|
||||
m_windowName = cef_string_alloc(r.m_windowName);
|
||||
else
|
||||
m_windowName = NULL;
|
||||
m_dwStyle = r.m_dwStyle;
|
||||
m_x = r.m_x;
|
||||
m_y = r.m_y;
|
||||
m_nWidth = r.m_nWidth;
|
||||
m_nHeight = r.m_nHeight;
|
||||
m_hWndParent = r.m_hWndParent;
|
||||
m_hMenu = r.m_hMenu;
|
||||
m_hWnd = r.m_hWnd;
|
||||
return *this;
|
||||
}
|
||||
|
||||
void SetAsChild(HWND hWndParent, RECT windowRect)
|
||||
{
|
||||
m_dwStyle = WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN
|
||||
| WS_CLIPSIBLINGS | WS_TABSTOP;
|
||||
m_hWndParent = hWndParent;
|
||||
m_x = windowRect.left;
|
||||
m_y = windowRect.top;
|
||||
m_nWidth = windowRect.right - windowRect.left;
|
||||
m_nHeight = windowRect.bottom - windowRect.top;
|
||||
}
|
||||
|
||||
void SetAsPopup(HWND hWndParent, LPCWSTR windowName)
|
||||
{
|
||||
m_dwStyle = WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS;
|
||||
m_hWndParent = hWndParent;
|
||||
m_x = CW_USEDEFAULT;
|
||||
m_y = CW_USEDEFAULT;
|
||||
m_nWidth = CW_USEDEFAULT;
|
||||
m_nHeight = CW_USEDEFAULT;
|
||||
|
||||
if(m_windowName)
|
||||
cef_string_free(m_windowName);
|
||||
if(windowName)
|
||||
m_windowName = cef_string_alloc(windowName);
|
||||
else
|
||||
m_windowName = NULL;
|
||||
}
|
||||
};
|
||||
|
||||
// Class representing print context information.
|
||||
class CefPrintInfo : public cef_print_info_t
|
||||
{
|
||||
public:
|
||||
CefPrintInfo()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
~CefPrintInfo()
|
||||
{
|
||||
}
|
||||
|
||||
CefPrintInfo(const CefPrintInfo& r)
|
||||
{
|
||||
Init();
|
||||
*this = r;
|
||||
}
|
||||
CefPrintInfo(const cef_print_info_t& r)
|
||||
{
|
||||
Init();
|
||||
*this = r;
|
||||
}
|
||||
|
||||
void Init()
|
||||
{
|
||||
m_hDC = NULL;
|
||||
m_Rect.left = m_Rect.right = m_Rect.top = m_Rect.bottom = 0;
|
||||
m_Scale = 0;
|
||||
}
|
||||
|
||||
CefPrintInfo& operator=(const CefPrintInfo& r)
|
||||
{
|
||||
return operator=(static_cast<const cef_print_info_t&>(r));
|
||||
}
|
||||
CefPrintInfo& operator=(const cef_print_info_t& r)
|
||||
{
|
||||
m_hDC = r.m_hDC;
|
||||
m_Rect.left = r.m_Rect.left;
|
||||
m_Rect.right = r.m_Rect.right;
|
||||
m_Rect.top = r.m_Rect.top;
|
||||
m_Rect.bottom = r.m_Rect.bottom;
|
||||
m_Scale = r.m_Scale;
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
// Window handle.
|
||||
#define CefWindowHandle cef_window_handle_t
|
||||
#endif // _WIN32
|
||||
|
||||
#endif // _CEF_WIN_H
|
||||
|
Reference in New Issue
Block a user