mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add ability to directly retrieve plugin information (issue #575).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@609 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
83
libcef_dll/ctocpp/web_plugin_info_ctocpp.cc
Normal file
83
libcef_dll/ctocpp/web_plugin_info_ctocpp.cc
Normal file
@@ -0,0 +1,83 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/web_plugin_info_ctocpp.h"
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
CefString CefWebPluginInfoCToCpp::GetName() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_name))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_name(struct_);
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
CefString CefWebPluginInfoCToCpp::GetPath() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_path))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_path(struct_);
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
CefString CefWebPluginInfoCToCpp::GetVersion() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_version))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_version(struct_);
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
CefString CefWebPluginInfoCToCpp::GetDescription() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_description))
|
||||
return CefString();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_string_userfree_t _retval = struct_->get_description(struct_);
|
||||
|
||||
// Return type: string
|
||||
CefString _retvalStr;
|
||||
_retvalStr.AttachToUserFree(_retval);
|
||||
return _retvalStr;
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefWebPluginInfoCToCpp, CefWebPluginInfo,
|
||||
cef_web_plugin_info_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
45
libcef_dll/ctocpp/web_plugin_info_ctocpp.h
Normal file
45
libcef_dll/ctocpp/web_plugin_info_ctocpp.h
Normal file
@@ -0,0 +1,45 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_WEB_PLUGIN_INFO_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_WEB_PLUGIN_INFO_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include "include/cef_web_plugin.h"
|
||||
#include "include/capi/cef_web_plugin_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefWebPluginInfoCToCpp
|
||||
: public CefCToCpp<CefWebPluginInfoCToCpp, CefWebPluginInfo,
|
||||
cef_web_plugin_info_t> {
|
||||
public:
|
||||
explicit CefWebPluginInfoCToCpp(cef_web_plugin_info_t* str)
|
||||
: CefCToCpp<CefWebPluginInfoCToCpp, CefWebPluginInfo,
|
||||
cef_web_plugin_info_t>(str) {}
|
||||
virtual ~CefWebPluginInfoCToCpp() {}
|
||||
|
||||
// CefWebPluginInfo methods
|
||||
virtual CefString GetName() OVERRIDE;
|
||||
virtual CefString GetPath() OVERRIDE;
|
||||
virtual CefString GetVersion() OVERRIDE;
|
||||
virtual CefString GetDescription() OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_WEB_PLUGIN_INFO_CTOCPP_H_
|
||||
|
46
libcef_dll/ctocpp/web_plugin_info_visitor_ctocpp.cc
Normal file
46
libcef_dll/ctocpp/web_plugin_info_visitor_ctocpp.cc
Normal file
@@ -0,0 +1,46 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/web_plugin_info_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/web_plugin_info_visitor_ctocpp.h"
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
bool CefWebPluginInfoVisitorCToCpp::Visit(CefRefPtr<CefWebPluginInfo> info,
|
||||
int count, int total) {
|
||||
if (CEF_MEMBER_MISSING(struct_, visit))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: info; type: refptr_diff
|
||||
DCHECK(info.get());
|
||||
if (!info.get())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->visit(struct_,
|
||||
CefWebPluginInfoCppToC::Wrap(info),
|
||||
count,
|
||||
total);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefWebPluginInfoVisitorCToCpp,
|
||||
CefWebPluginInfoVisitor, cef_web_plugin_info_visitor_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
43
libcef_dll/ctocpp/web_plugin_info_visitor_ctocpp.h
Normal file
43
libcef_dll/ctocpp/web_plugin_info_visitor_ctocpp.h
Normal file
@@ -0,0 +1,43 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_WEB_PLUGIN_INFO_VISITOR_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_WEB_PLUGIN_INFO_VISITOR_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/cef_web_plugin.h"
|
||||
#include "include/capi/cef_web_plugin_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefWebPluginInfoVisitorCToCpp
|
||||
: public CefCToCpp<CefWebPluginInfoVisitorCToCpp, CefWebPluginInfoVisitor,
|
||||
cef_web_plugin_info_visitor_t> {
|
||||
public:
|
||||
explicit CefWebPluginInfoVisitorCToCpp(cef_web_plugin_info_visitor_t* str)
|
||||
: CefCToCpp<CefWebPluginInfoVisitorCToCpp, CefWebPluginInfoVisitor,
|
||||
cef_web_plugin_info_visitor_t>(str) {}
|
||||
virtual ~CefWebPluginInfoVisitorCToCpp() {}
|
||||
|
||||
// CefWebPluginInfoVisitor methods
|
||||
virtual bool Visit(CefRefPtr<CefWebPluginInfo> info, int count,
|
||||
int total) OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_WEB_PLUGIN_INFO_VISITOR_CTOCPP_H_
|
||||
|
Reference in New Issue
Block a user