mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-07 15:48:41 +01:00
- Add the CefBrowser::CreateBrowserSync() method for synchronously creating a browser instance. (Issue #13, Suggested implementation by: vridosh) - Add CefBrowser::SetFocus() and CefHandler::HandleTakeFocus() methods to deal with keyboard focus changes. (Issue #13, Suggested implementation by: vridosh) - Add CefHandler::HandleBeforeWindowClose() to perform actions immediately before the browser window is destroyed. (Issue #13, Suggested implementation by: vridosh) - Replace windows-specific address resolution code with GURL() in CefBrowserImpl::UIT_LoadURLForRequest(), CefBrowserImpl::UIT_LoadHTML() and CefBrowserImpl::UIT_LoadHTMLForStreamRef(), and move the methods from browser_impl_win.cc to browser_impl.cc. (Issue #13, Suggested implementation by: vridosh) - Fix reference counting bugs, class definition problems and CefContext::Shutdown() bug resulting in Cef object leaks. (Issue #15) - Add WebKit dependancy to libcef project. - Add basic object count debugging for CefCToCpp and CefCppToC classes. cefclient: - Initialize the strPtr parameter to avoid URLs suffixed with garbage. (Issue #13, Fix by: vridosh) git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@19 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
69 lines
2.6 KiB
C++
69 lines
2.6 KiB
C++
// Copyright (c) 2009 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.
|
|
|
|
#ifndef _BROWSER_CTOCPP_H
|
|
#define _BROWSER_CTOCPP_H
|
|
|
|
#ifndef USING_CEF_SHARED
|
|
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
|
#else // USING_CEF_SHARED
|
|
|
|
#include "cef.h"
|
|
#include "cef_capi.h"
|
|
#include "ctocpp.h"
|
|
|
|
|
|
// Wrap a C browser structure with a C++ browser class.
|
|
// This class may be instantiated and accessed wrapper-side only.
|
|
class CefBrowserCToCpp : public CefCToCpp<CefBrowser, cef_browser_t>
|
|
{
|
|
public:
|
|
CefBrowserCToCpp(cef_browser_t* str)
|
|
: CefCToCpp<CefBrowser, cef_browser_t>(str) {}
|
|
virtual ~CefBrowserCToCpp() {}
|
|
|
|
// CefBrowser methods
|
|
virtual bool CanGoBack();
|
|
virtual void GoBack();
|
|
virtual bool CanGoForward();
|
|
virtual void GoForward();
|
|
virtual void Reload();
|
|
virtual void StopLoad();
|
|
virtual void Undo(TargetFrame targetFrame);
|
|
virtual void Redo(TargetFrame targetFrame);
|
|
virtual void Cut(TargetFrame targetFrame);
|
|
virtual void Copy(TargetFrame targetFrame);
|
|
virtual void Paste(TargetFrame targetFrame);
|
|
virtual void Delete(TargetFrame targetFrame);
|
|
virtual void SelectAll(TargetFrame targetFrame);
|
|
virtual void SetFocus(bool enable);
|
|
virtual void Print(TargetFrame targetFrame);
|
|
virtual void ViewSource(TargetFrame targetFrame);
|
|
virtual std::wstring GetSource(TargetFrame targetFrame);
|
|
virtual std::wstring GetText(TargetFrame targetFrame);
|
|
virtual void LoadRequest(CefRefPtr<CefRequest> request);
|
|
virtual void LoadURL(const std::wstring& url, const std::wstring& frame);
|
|
virtual void LoadString(const std::wstring& string,
|
|
const std::wstring& url);
|
|
virtual void LoadStream(CefRefPtr<CefStreamReader> stream,
|
|
const std::wstring& url);
|
|
virtual void ExecuteJavaScript(const std::wstring& js_code,
|
|
const std::wstring& script_url,
|
|
int start_line, TargetFrame targetFrame);
|
|
virtual bool AddJSHandler(const std::wstring& classname,
|
|
CefRefPtr<CefJSHandler> handler);
|
|
virtual bool HasJSHandler(const std::wstring& classname);
|
|
virtual CefRefPtr<CefJSHandler> GetJSHandler(const std::wstring& classname);
|
|
virtual bool RemoveJSHandler(const std::wstring& classname);
|
|
virtual void RemoveAllJSHandlers();
|
|
virtual CefWindowHandle GetWindowHandle();
|
|
virtual bool IsPopup();
|
|
virtual CefRefPtr<CefHandler> GetHandler();
|
|
virtual std::wstring GetURL();
|
|
};
|
|
|
|
|
|
#endif // USING_CEF_SHARED
|
|
#endif // _BROWSER_CTOCPP_H
|