mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Branch CEF3 files from /branches/cef3 to /trunk/cef3 (issue #564).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@571 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
155
libcef_dll/ctocpp/browser_host_ctocpp.cc
Normal file
155
libcef_dll/ctocpp/browser_host_ctocpp.cc
Normal file
@ -0,0 +1,155 @@
|
||||
// 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/client_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/browser_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/browser_host_ctocpp.h"
|
||||
|
||||
|
||||
// STATIC METHODS - Body may be edited by hand.
|
||||
|
||||
bool CefBrowserHost::CreateBrowser(const CefWindowInfo& windowInfo,
|
||||
CefRefPtr<CefClient> client, const CefString& url,
|
||||
const CefBrowserSettings& settings) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: client; type: refptr_diff
|
||||
DCHECK(client.get());
|
||||
if (!client.get())
|
||||
return false;
|
||||
// Unverified params: url
|
||||
|
||||
// Execute
|
||||
int _retval = cef_browser_host_create_browser(
|
||||
&windowInfo,
|
||||
CefClientCppToC::Wrap(client),
|
||||
url.GetStruct(),
|
||||
&settings);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
CefRefPtr<CefBrowser> CefBrowserHost::CreateBrowserSync(
|
||||
const CefWindowInfo& windowInfo, CefRefPtr<CefClient> client,
|
||||
const CefString& url, const CefBrowserSettings& settings) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: client; type: refptr_diff
|
||||
DCHECK(client.get());
|
||||
if (!client.get())
|
||||
return NULL;
|
||||
// Unverified params: url
|
||||
|
||||
// Execute
|
||||
cef_browser_t* _retval = cef_browser_host_create_browser_sync(
|
||||
&windowInfo,
|
||||
CefClientCppToC::Wrap(client),
|
||||
url.GetStruct(),
|
||||
&settings);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefBrowserCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
CefRefPtr<CefBrowser> CefBrowserHostCToCpp::GetBrowser() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_browser))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_browser_t* _retval = struct_->get_browser(struct_);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefBrowserCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
void CefBrowserHostCToCpp::ParentWindowWillClose() {
|
||||
if (CEF_MEMBER_MISSING(struct_, parent_window_will_close))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
struct_->parent_window_will_close(struct_);
|
||||
}
|
||||
|
||||
void CefBrowserHostCToCpp::CloseBrowser() {
|
||||
if (CEF_MEMBER_MISSING(struct_, close_browser))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
struct_->close_browser(struct_);
|
||||
}
|
||||
|
||||
void CefBrowserHostCToCpp::SetFocus(bool enable) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_focus))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
struct_->set_focus(struct_,
|
||||
enable);
|
||||
}
|
||||
|
||||
CefWindowHandle CefBrowserHostCToCpp::GetWindowHandle() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_window_handle))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_window_handle_t _retval = struct_->get_window_handle(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
CefWindowHandle CefBrowserHostCToCpp::GetOpenerWindowHandle() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_opener_window_handle))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_window_handle_t _retval = struct_->get_opener_window_handle(struct_);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
CefRefPtr<CefClient> CefBrowserHostCToCpp::GetClient() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_client))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_client_t* _retval = struct_->get_client(struct_);
|
||||
|
||||
// Return type: refptr_diff
|
||||
return CefClientCppToC::Unwrap(_retval);
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefBrowserHostCToCpp, CefBrowserHost,
|
||||
cef_browser_host_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user