mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update all files to use Windows CRLF (\r\n) line endings (issue #45).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@33 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -1,32 +1,32 @@
|
||||
// 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.
|
||||
// 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
|
||||
|
@@ -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 "webkit/glue/plugins/nphostapi.h"
|
||||
#include "third_party/npapi/bindings/npapi.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 "webkit/glue/plugins/nphostapi.h"
|
||||
#include "third_party/npapi/bindings/npapi.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,64 +1,64 @@
|
||||
// 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
|
||||
|
||||
// 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 "webkit/glue/plugins/nphostapi.h"
|
||||
#include "third_party/npapi/bindings/npapi.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.
|
||||
#include "webkit/glue/plugins/nphostapi.h"
|
||||
#include "third_party/npapi/bindings/npapi.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.
|
||||
@@ -71,20 +71,20 @@ typedef struct _cef_plugin_info_t {
|
||||
|
||||
// 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);
|
||||
|
||||
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
|
||||
#endif // _CEF_PLUGIN_CAPI_H
|
||||
|
@@ -1,126 +1,126 @@
|
||||
// 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.
|
||||
// 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.
|
||||
// }
|
||||
//
|
||||
// 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:
|
||||
//
|
||||
@@ -128,66 +128,66 @@
|
||||
// // 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);
|
||||
// // 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_;
|
||||
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,30 +1,30 @@
|
||||
// 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
|
||||
// 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
|
||||
|
@@ -1,30 +1,30 @@
|
||||
// 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
|
||||
// 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
|
||||
|
@@ -1,30 +1,30 @@
|
||||
// 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
|
||||
// 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
|
||||
|
@@ -1,31 +1,31 @@
|
||||
// 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.
|
||||
// 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
|
||||
@@ -35,12 +35,12 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// Bring in platform-specific definitions.
|
||||
#ifdef _WIN32
|
||||
#include "cef_types_win.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
// Define handler return value types. Returning RV_HANDLED indicates
|
||||
// that the implementation completely handled the method and that no further
|
||||
@@ -56,11 +56,11 @@ enum cef_retval_t
|
||||
// Various browser navigation types supported by chrome.
|
||||
enum cef_handler_navtype_t
|
||||
{
|
||||
NAVTYPE_LINKCLICKED = 0,
|
||||
NAVTYPE_FORMSUBMITTED,
|
||||
NAVTYPE_BACKFORWARD,
|
||||
NAVTYPE_RELOAD,
|
||||
NAVTYPE_FORMRESUBMITTED,
|
||||
NAVTYPE_LINKCLICKED = 0,
|
||||
NAVTYPE_FORMSUBMITTED,
|
||||
NAVTYPE_BACKFORWARD,
|
||||
NAVTYPE_RELOAD,
|
||||
NAVTYPE_FORMRESUBMITTED,
|
||||
NAVTYPE_OTHER,
|
||||
};
|
||||
|
||||
@@ -68,62 +68,62 @@ enum cef_handler_navtype_t
|
||||
// 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_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;
|
||||
int typeFlags;
|
||||
int x;
|
||||
int y;
|
||||
const wchar_t* linkUrl;
|
||||
const wchar_t* imageUrl;
|
||||
const wchar_t* pageUrl;
|
||||
@@ -137,60 +137,60 @@ typedef struct _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,
|
||||
{
|
||||
// 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
|
||||
{
|
||||
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_GO_FORWARD = 0x80,
|
||||
MENU_CAN_GO_BACK = 0x100,
|
||||
enum cef_handler_menucapabilitybits_t
|
||||
{
|
||||
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_GO_FORWARD = 0x80,
|
||||
MENU_CAN_GO_BACK = 0x100,
|
||||
};
|
||||
|
||||
// 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_STOP = 13,
|
||||
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_NAV_BACK = 10,
|
||||
MENU_ID_NAV_FORWARD = 11,
|
||||
MENU_ID_NAV_RELOAD = 12,
|
||||
MENU_ID_NAV_STOP = 13,
|
||||
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,
|
||||
};
|
||||
|
||||
|
@@ -1,31 +1,31 @@
|
||||
// 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.
|
||||
// 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
|
||||
|
@@ -1,31 +1,31 @@
|
||||
// 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.
|
||||
// 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
|
||||
@@ -78,15 +78,15 @@ public:
|
||||
cef_string_free(m_windowName);
|
||||
}
|
||||
|
||||
CefWindowInfo(const CefWindowInfo& r)
|
||||
{
|
||||
Init();
|
||||
*this = r;
|
||||
CefWindowInfo(const CefWindowInfo& r)
|
||||
{
|
||||
Init();
|
||||
*this = r;
|
||||
}
|
||||
CefWindowInfo(const cef_window_info_t& r)
|
||||
{
|
||||
Init();
|
||||
*this = r;
|
||||
CefWindowInfo(const cef_window_info_t& r)
|
||||
{
|
||||
Init();
|
||||
*this = r;
|
||||
}
|
||||
|
||||
void Init()
|
||||
@@ -103,28 +103,28 @@ public:
|
||||
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;
|
||||
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)
|
||||
@@ -140,16 +140,16 @@ public:
|
||||
|
||||
void SetAsPopup(HWND hWndParent, LPCTSTR 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_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;
|
||||
@@ -168,15 +168,15 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
CefPrintInfo(const CefPrintInfo& r)
|
||||
{
|
||||
Init();
|
||||
*this = r;
|
||||
CefPrintInfo(const CefPrintInfo& r)
|
||||
{
|
||||
Init();
|
||||
*this = r;
|
||||
}
|
||||
CefPrintInfo(const cef_print_info_t& r)
|
||||
{
|
||||
Init();
|
||||
*this = r;
|
||||
CefPrintInfo(const cef_print_info_t& r)
|
||||
{
|
||||
Init();
|
||||
*this = r;
|
||||
}
|
||||
|
||||
void Init()
|
||||
@@ -186,19 +186,19 @@ public:
|
||||
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)
|
||||
{
|
||||
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;
|
||||
m_Scale = r.m_Scale;
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user