mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add a new CefGetGeolocation function for retrieving geolocation information via an API callback (issue #764).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@868 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -12,6 +12,8 @@
|
||||
|
||||
#include "include/cef_app.h"
|
||||
#include "include/capi/cef_app_capi.h"
|
||||
#include "include/cef_geolocation.h"
|
||||
#include "include/capi/cef_geolocation_capi.h"
|
||||
#include "include/cef_origin_whitelist.h"
|
||||
#include "include/capi/cef_origin_whitelist_capi.h"
|
||||
#include "include/cef_path_util.h"
|
||||
@@ -76,6 +78,7 @@
|
||||
#include "libcef_dll/ctocpp/download_handler_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/focus_handler_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/geolocation_handler_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/get_geolocation_callback_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/jsdialog_handler_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/keyboard_handler_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/life_span_handler_ctocpp.h"
|
||||
@@ -193,6 +196,7 @@ CEF_EXPORT void cef_shutdown() {
|
||||
DCHECK_EQ(CefFrameCppToC::DebugObjCt, 0);
|
||||
DCHECK_EQ(CefGeolocationCallbackCppToC::DebugObjCt, 0);
|
||||
DCHECK_EQ(CefGeolocationHandlerCToCpp::DebugObjCt, 0);
|
||||
DCHECK_EQ(CefGetGeolocationCallbackCToCpp::DebugObjCt, 0);
|
||||
DCHECK_EQ(CefJSDialogCallbackCppToC::DebugObjCt, 0);
|
||||
DCHECK_EQ(CefJSDialogHandlerCToCpp::DebugObjCt, 0);
|
||||
DCHECK_EQ(CefKeyboardHandlerCToCpp::DebugObjCt, 0);
|
||||
@@ -255,6 +259,23 @@ CEF_EXPORT void cef_quit_message_loop() {
|
||||
CefQuitMessageLoop();
|
||||
}
|
||||
|
||||
CEF_EXPORT int cef_get_geolocation(
|
||||
struct _cef_get_geolocation_callback_t* callback) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: callback; type: refptr_diff
|
||||
DCHECK(callback);
|
||||
if (!callback)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefGetGeolocation(
|
||||
CefGetGeolocationCallbackCToCpp::Wrap(callback));
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
CEF_EXPORT int cef_add_cross_origin_whitelist_entry(
|
||||
const cef_string_t* source_origin, const cef_string_t* target_protocol,
|
||||
const cef_string_t* target_domain, int allow_target_subdomains) {
|
||||
|
Reference in New Issue
Block a user