2010-10-03 23:04:50 +02:00
|
|
|
// Copyright (c) 2008-2009 The Chromium Embedded Framework Authors.
|
|
|
|
// Portions copyright (c) 2006-2008 The Chromium 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_IMPL_H
|
|
|
|
#define _BROWSER_IMPL_H
|
|
|
|
|
|
|
|
#include "include/cef.h"
|
|
|
|
|
|
|
|
#include "webview_host.h"
|
2011-01-25 19:37:27 +01:00
|
|
|
#include "browser_devtools_agent.h"
|
|
|
|
#include "browser_devtools_client.h"
|
2010-10-03 23:04:50 +02:00
|
|
|
#include "browser_webview_delegate.h"
|
|
|
|
#include "browser_navigation_controller.h"
|
|
|
|
#include "cef_thread.h"
|
|
|
|
#if defined(OS_WIN)
|
|
|
|
#include "printing/win_printing_context.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "base/scoped_temp_dir.h"
|
2011-02-15 19:07:24 +01:00
|
|
|
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h"
|
2010-10-03 23:04:50 +02:00
|
|
|
|
|
|
|
namespace base {
|
|
|
|
class WaitableEvent;
|
|
|
|
}
|
|
|
|
namespace WebKit {
|
|
|
|
class WebView;
|
|
|
|
}
|
|
|
|
|
|
|
|
#define BUFFER_SIZE 32768
|
|
|
|
|
|
|
|
|
|
|
|
// Implementation of CefBrowser.
|
|
|
|
class CefBrowserImpl : public CefThreadSafeBase<CefBrowser>
|
|
|
|
{
|
|
|
|
public:
|
2010-11-18 22:05:25 +01:00
|
|
|
CefBrowserImpl(const CefWindowInfo& windowInfo,
|
|
|
|
const CefBrowserSettings& settings, bool popup,
|
2010-10-03 23:04:50 +02:00
|
|
|
CefRefPtr<CefHandler> handler);
|
|
|
|
virtual ~CefBrowserImpl() {}
|
|
|
|
|
|
|
|
#if defined(OS_WIN)
|
|
|
|
static LPCTSTR GetWndClass();
|
|
|
|
static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam,
|
|
|
|
LPARAM lParam);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// CefBrowser methods
|
2011-01-29 02:42:59 +01:00
|
|
|
virtual bool CanGoBack() { return can_go_back(); }
|
2010-10-03 23:04:50 +02:00
|
|
|
virtual void GoBack();
|
2011-01-29 02:42:59 +01:00
|
|
|
virtual bool CanGoForward() { return can_go_forward(); }
|
2010-10-03 23:04:50 +02:00
|
|
|
virtual void GoForward();
|
|
|
|
virtual void Reload();
|
|
|
|
virtual void ReloadIgnoreCache();
|
|
|
|
virtual void StopLoad();
|
|
|
|
virtual void SetFocus(bool enable);
|
|
|
|
virtual CefWindowHandle GetWindowHandle();
|
2011-01-29 02:42:59 +01:00
|
|
|
virtual bool IsPopup() { return is_popup(); }
|
|
|
|
virtual CefRefPtr<CefHandler> GetHandler() { return handler_; }
|
|
|
|
virtual CefRefPtr<CefFrame> GetMainFrame() { return GetMainCefFrame(); }
|
2010-10-03 23:04:50 +02:00
|
|
|
virtual CefRefPtr<CefFrame> GetFocusedFrame();
|
2010-11-22 18:49:46 +01:00
|
|
|
virtual CefRefPtr<CefFrame> GetFrame(const CefString& name);
|
|
|
|
virtual void GetFrameNames(std::vector<CefString>& names);
|
|
|
|
virtual void Find(int identifier, const CefString& searchText,
|
2010-10-03 23:04:50 +02:00
|
|
|
bool forward, bool matchCase, bool findNext);
|
|
|
|
virtual void StopFinding(bool clearSelection);
|
2011-01-29 02:42:59 +01:00
|
|
|
virtual double GetZoomLevel() { return zoom_level(); }
|
2011-01-25 16:34:50 +01:00
|
|
|
virtual void SetZoomLevel(double zoomLevel);
|
2011-01-25 19:37:27 +01:00
|
|
|
virtual void ShowDevTools();
|
|
|
|
virtual void CloseDevTools();
|
2011-01-25 16:34:50 +01:00
|
|
|
|
2010-10-03 23:04:50 +02:00
|
|
|
// Frame-related methods
|
|
|
|
void Undo(CefRefPtr<CefFrame> frame);
|
|
|
|
void Redo(CefRefPtr<CefFrame> frame);
|
|
|
|
void Cut(CefRefPtr<CefFrame> frame);
|
|
|
|
void Copy(CefRefPtr<CefFrame> frame);
|
|
|
|
void Paste(CefRefPtr<CefFrame> frame);
|
|
|
|
void Delete(CefRefPtr<CefFrame> frame);
|
|
|
|
void SelectAll(CefRefPtr<CefFrame> frame);
|
|
|
|
void Print(CefRefPtr<CefFrame> frame);
|
|
|
|
void ViewSource(CefRefPtr<CefFrame> frame);
|
2010-11-22 18:49:46 +01:00
|
|
|
CefString GetSource(CefRefPtr<CefFrame> frame);
|
|
|
|
CefString GetText(CefRefPtr<CefFrame> frame);
|
2010-10-03 23:04:50 +02:00
|
|
|
void LoadRequest(CefRefPtr<CefFrame> frame,
|
|
|
|
CefRefPtr<CefRequest> request);
|
|
|
|
void LoadURL(CefRefPtr<CefFrame> frame,
|
2010-11-22 18:49:46 +01:00
|
|
|
const CefString& url);
|
2010-10-03 23:04:50 +02:00
|
|
|
void LoadString(CefRefPtr<CefFrame> frame,
|
2010-11-22 18:49:46 +01:00
|
|
|
const CefString& string,
|
|
|
|
const CefString& url);
|
2010-10-03 23:04:50 +02:00
|
|
|
void LoadStream(CefRefPtr<CefFrame> frame,
|
|
|
|
CefRefPtr<CefStreamReader> stream,
|
2010-11-22 18:49:46 +01:00
|
|
|
const CefString& url);
|
2010-10-03 23:04:50 +02:00
|
|
|
void ExecuteJavaScript(CefRefPtr<CefFrame> frame,
|
2010-11-22 18:49:46 +01:00
|
|
|
const CefString& jsCode,
|
|
|
|
const CefString& scriptUrl,
|
2010-10-03 23:04:50 +02:00
|
|
|
int startLine);
|
2010-11-22 18:49:46 +01:00
|
|
|
CefString GetURL(CefRefPtr<CefFrame> frame);
|
2010-11-18 22:05:25 +01:00
|
|
|
|
2011-01-29 02:42:59 +01:00
|
|
|
// CefFrames are light-weight objects managed by the browser and loosely
|
|
|
|
// coupled to a WebFrame object by name. If a CefFrame object does not
|
|
|
|
// already exist for the specified name one will be created. There is no
|
|
|
|
// guarantee that the same CefFrame object will be returned across different
|
|
|
|
// calls to this function.
|
|
|
|
CefRefPtr<CefFrame> GetCefFrame(const CefString& name);
|
|
|
|
void RemoveCefFrame(const CefString& name);
|
|
|
|
CefRefPtr<CefFrame> GetMainCefFrame();
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////
|
|
|
|
// ALL UIT_* METHODS MUST ONLY BE CALLED ON THE UI THREAD //
|
|
|
|
////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
CefRefPtr<CefFrame> UIT_GetCefFrame(WebKit::WebFrame* frame);
|
|
|
|
|
|
|
|
// Return the main WebFrame object.
|
|
|
|
WebKit::WebFrame* UIT_GetMainWebFrame();
|
|
|
|
|
|
|
|
// Return the WebFrame object associated with the specified CefFrame. This
|
|
|
|
// may return NULL if no WebFrame with the CefFrame's name exists.
|
|
|
|
WebKit::WebFrame* UIT_GetWebFrame(CefRefPtr<CefFrame> frame);
|
|
|
|
|
|
|
|
WebKit::WebView* UIT_GetWebView() const {
|
|
|
|
REQUIRE_UIT();
|
2010-10-03 23:04:50 +02:00
|
|
|
return webviewhost_.get() ? webviewhost_->webview() : NULL;
|
|
|
|
}
|
2011-01-29 02:42:59 +01:00
|
|
|
WebViewHost* UIT_GetWebViewHost() const {
|
|
|
|
REQUIRE_UIT();
|
2010-10-03 23:04:50 +02:00
|
|
|
return webviewhost_.get();
|
|
|
|
}
|
2011-01-29 02:42:59 +01:00
|
|
|
BrowserWebViewDelegate* UIT_GetWebViewDelegate() const {
|
|
|
|
REQUIRE_UIT();
|
2010-10-03 23:04:50 +02:00
|
|
|
return delegate_.get();
|
|
|
|
}
|
2011-01-29 02:42:59 +01:00
|
|
|
gfx::NativeView UIT_GetWebViewWndHandle() const {
|
|
|
|
REQUIRE_UIT();
|
2010-10-03 23:04:50 +02:00
|
|
|
return webviewhost_->view_handle();
|
|
|
|
}
|
2011-01-29 02:42:59 +01:00
|
|
|
WebKit::WebWidget* UIT_GetPopup() const {
|
|
|
|
REQUIRE_UIT();
|
2010-10-03 23:04:50 +02:00
|
|
|
return popuphost_ ? popuphost_->webwidget() : NULL;
|
|
|
|
}
|
2011-01-29 02:42:59 +01:00
|
|
|
WebWidgetHost* UIT_GetPopupHost() const {
|
|
|
|
REQUIRE_UIT();
|
2010-10-03 23:04:50 +02:00
|
|
|
return popuphost_;
|
|
|
|
}
|
2011-01-29 02:42:59 +01:00
|
|
|
BrowserWebViewDelegate* UIT_GetPopupDelegate() const {
|
|
|
|
REQUIRE_UIT();
|
2010-10-03 23:04:50 +02:00
|
|
|
return popup_delegate_.get();
|
|
|
|
}
|
2011-01-29 02:42:59 +01:00
|
|
|
gfx::NativeView UIT_GetPopupWndHandle() const {
|
|
|
|
REQUIRE_UIT();
|
2010-10-03 23:04:50 +02:00
|
|
|
return popuphost_->view_handle();
|
|
|
|
}
|
2011-02-02 03:25:32 +01:00
|
|
|
gfx::NativeView UIT_GetMainWndHandle() const;
|
2010-10-03 23:04:50 +02:00
|
|
|
|
|
|
|
BrowserNavigationController* UIT_GetNavigationController() {
|
|
|
|
REQUIRE_UIT();
|
|
|
|
return nav_controller_.get();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Return true to allow user editing such as entering text in form elements
|
|
|
|
bool UIT_AllowEditing() { return true; }
|
|
|
|
|
|
|
|
bool UIT_IsModal() {
|
|
|
|
REQUIRE_UIT();
|
|
|
|
return is_modal_;
|
|
|
|
}
|
|
|
|
void UIT_SetIsModal(bool val) {
|
|
|
|
REQUIRE_UIT();
|
|
|
|
is_modal_ = val;
|
|
|
|
}
|
|
|
|
|
2010-11-22 18:49:46 +01:00
|
|
|
CefString UIT_GetTitle() {
|
2010-10-03 23:04:50 +02:00
|
|
|
REQUIRE_UIT();
|
|
|
|
return title_;
|
|
|
|
}
|
2011-01-29 02:42:59 +01:00
|
|
|
void UIT_SetTitle(const CefString& title) {
|
|
|
|
REQUIRE_UIT();
|
|
|
|
title_ = title;
|
|
|
|
}
|
2010-10-03 23:04:50 +02:00
|
|
|
|
2011-01-29 23:52:34 +01:00
|
|
|
// Create the native browser window and populate browser members.
|
2010-11-22 18:49:46 +01:00
|
|
|
void UIT_CreateBrowser(const CefString& url);
|
2011-01-29 23:52:34 +01:00
|
|
|
|
|
|
|
// Destroy the browser members. This method should only be called after the
|
|
|
|
// native browser window is not longer processing messages.
|
2010-11-15 16:39:56 +01:00
|
|
|
void UIT_DestroyBrowser();
|
2010-10-03 23:04:50 +02:00
|
|
|
|
2011-01-29 23:52:34 +01:00
|
|
|
// Sends a message via the OS to close the native browser window.
|
|
|
|
// UIT_DestroyBrowser will be called after the native window has closed.
|
|
|
|
void UIT_CloseBrowser();
|
|
|
|
|
|
|
|
void UIT_LoadURL(CefRefPtr<CefFrame> frame,
|
2010-11-22 18:49:46 +01:00
|
|
|
const CefString& url);
|
2011-01-29 23:52:34 +01:00
|
|
|
void UIT_LoadURLForRequest(CefRefPtr<CefFrame> frame,
|
2010-11-22 18:49:46 +01:00
|
|
|
const CefString& url,
|
|
|
|
const CefString& method,
|
2010-10-03 23:04:50 +02:00
|
|
|
const WebKit::WebHTTPBody& upload_data,
|
|
|
|
const CefRequest::HeaderMap& headers);
|
2011-01-29 23:52:34 +01:00
|
|
|
void UIT_LoadURLForRequestRef(CefRefPtr<CefFrame> frame,
|
|
|
|
CefRefPtr<CefRequest> request);
|
|
|
|
void UIT_LoadHTML(CefRefPtr<CefFrame> frame,
|
2010-11-22 18:49:46 +01:00
|
|
|
const CefString& html,
|
|
|
|
const CefString& url);
|
2011-01-29 23:52:34 +01:00
|
|
|
void UIT_LoadHTMLForStreamRef(CefRefPtr<CefFrame> frame,
|
|
|
|
CefRefPtr<CefStreamReader> stream,
|
2010-11-22 18:49:46 +01:00
|
|
|
const CefString& url);
|
2011-01-29 23:52:34 +01:00
|
|
|
void UIT_ExecuteJavaScript(CefRefPtr<CefFrame> frame,
|
2010-11-22 18:49:46 +01:00
|
|
|
const CefString& js_code,
|
|
|
|
const CefString& script_url,
|
2010-10-03 23:04:50 +02:00
|
|
|
int start_line);
|
|
|
|
void UIT_GoBackOrForward(int offset);
|
|
|
|
void UIT_Reload(bool ignoreCache);
|
|
|
|
bool UIT_Navigate(const BrowserNavigationEntry& entry,
|
|
|
|
bool reload,
|
|
|
|
bool ignoreCahce);
|
|
|
|
void UIT_SetFocus(WebWidgetHost* host, bool enable);
|
|
|
|
|
2010-11-22 18:49:46 +01:00
|
|
|
CefRefPtr<CefBrowserImpl> UIT_CreatePopupWindow(const CefString& url,
|
2010-11-16 17:45:49 +01:00
|
|
|
const CefPopupFeatures& features);
|
2010-10-03 23:04:50 +02:00
|
|
|
WebKit::WebWidget* UIT_CreatePopupWidget();
|
|
|
|
void UIT_ClosePopupWidget();
|
|
|
|
|
|
|
|
void UIT_Show(WebKit::WebNavigationPolicy policy);
|
|
|
|
|
|
|
|
// Handles most simple browser actions
|
|
|
|
void UIT_HandleActionView(CefHandler::MenuId menuId);
|
2011-01-29 23:52:34 +01:00
|
|
|
void UIT_HandleAction(CefHandler::MenuId menuId, CefRefPtr<CefFrame> frame);
|
2010-10-03 23:04:50 +02:00
|
|
|
|
|
|
|
// Save the document HTML to a temporary file and open in the default viewing
|
|
|
|
// application
|
|
|
|
bool UIT_ViewDocumentString(WebKit::WebFrame *frame);
|
|
|
|
|
|
|
|
bool UIT_CanGoBack() { return !nav_controller_->IsAtStart(); }
|
|
|
|
bool UIT_CanGoForward() { return !nav_controller_->IsAtEnd(); }
|
|
|
|
|
|
|
|
// Printing support
|
|
|
|
void UIT_PrintPages(WebKit::WebFrame* frame);
|
|
|
|
void UIT_PrintPage(int page_number, int total_pages,
|
|
|
|
const gfx::Size& canvas_size, WebKit::WebFrame* frame);
|
|
|
|
int UIT_GetPagesCount(WebKit::WebFrame* frame);
|
|
|
|
|
|
|
|
void UIT_SetUniqueID(int id) { unique_id_ = id; }
|
|
|
|
int UIT_GetUniqueID() { return unique_id_; }
|
|
|
|
|
2010-11-22 18:49:46 +01:00
|
|
|
void UIT_Find(int identifier, const CefString& search_text,
|
2010-10-03 23:04:50 +02:00
|
|
|
const WebKit::WebFindOptions& options);
|
|
|
|
void UIT_StopFinding(bool clear_selection);
|
|
|
|
void UIT_NotifyFindStatus(int identifier, int count,
|
|
|
|
const WebKit::WebRect& selection_rect,
|
|
|
|
int active_match_ordinal, bool final_update);
|
2011-01-29 02:42:59 +01:00
|
|
|
void UIT_SetZoomLevel(double zoomLevel);
|
2011-01-25 19:37:27 +01:00
|
|
|
void UIT_ShowDevTools();
|
|
|
|
void UIT_CloseDevTools();
|
2010-10-03 23:04:50 +02:00
|
|
|
|
2011-01-29 02:42:59 +01:00
|
|
|
// These variables are read-only.
|
2010-11-18 22:05:25 +01:00
|
|
|
const CefBrowserSettings& settings() const { return settings_; }
|
2010-10-03 23:04:50 +02:00
|
|
|
const FilePath& file_system_root() const { return file_system_root_.path(); }
|
2011-01-29 02:42:59 +01:00
|
|
|
bool is_popup() { return is_popup_; }
|
|
|
|
|
|
|
|
// These variables may be read/written from multiple threads.
|
|
|
|
void set_zoom_level(double zoomLevel);
|
|
|
|
double zoom_level();
|
|
|
|
void set_nav_state(bool can_go_back, bool can_go_forward);
|
|
|
|
bool can_go_back();
|
|
|
|
bool can_go_forward();
|
|
|
|
|
|
|
|
static bool ImplementsThreadSafeReferenceCounting() { return true; }
|
2010-10-03 23:04:50 +02:00
|
|
|
|
2011-01-25 19:37:27 +01:00
|
|
|
protected:
|
2011-02-01 16:37:47 +01:00
|
|
|
static void UIT_CloseView(gfx::NativeView view);
|
|
|
|
|
2011-01-29 02:42:59 +01:00
|
|
|
void UIT_CreateDevToolsClient(BrowserDevToolsAgent* agent);
|
2011-01-29 23:52:34 +01:00
|
|
|
void UIT_DestroyDevToolsClient();
|
2011-01-25 19:37:27 +01:00
|
|
|
|
2010-10-03 23:04:50 +02:00
|
|
|
protected:
|
|
|
|
CefWindowInfo window_info_;
|
2010-11-18 22:05:25 +01:00
|
|
|
CefBrowserSettings settings_;
|
2010-10-03 23:04:50 +02:00
|
|
|
bool is_popup_;
|
|
|
|
bool is_modal_;
|
|
|
|
CefRefPtr<CefHandler> handler_;
|
|
|
|
scoped_ptr<WebViewHost> webviewhost_;
|
|
|
|
WebWidgetHost* popuphost_;
|
|
|
|
scoped_ptr<BrowserWebViewDelegate> delegate_;
|
|
|
|
scoped_ptr<BrowserWebViewDelegate> popup_delegate_;
|
|
|
|
scoped_ptr<BrowserNavigationController> nav_controller_;
|
|
|
|
|
2011-01-25 19:37:27 +01:00
|
|
|
scoped_ptr<BrowserDevToolsAgent> dev_tools_agent_;
|
|
|
|
scoped_ptr<BrowserDevToolsClient> dev_tools_client_;
|
|
|
|
|
2010-11-22 18:49:46 +01:00
|
|
|
CefString title_;
|
2010-10-03 23:04:50 +02:00
|
|
|
|
2011-01-29 02:42:59 +01:00
|
|
|
double zoom_level_;
|
|
|
|
bool can_go_back_;
|
|
|
|
bool can_go_forward_;
|
|
|
|
|
2010-10-09 21:21:09 +02:00
|
|
|
#if defined(OS_WIN)
|
2010-10-03 23:04:50 +02:00
|
|
|
// Context object used to manage printing.
|
|
|
|
printing::PrintingContext print_context_;
|
2010-10-09 21:21:09 +02:00
|
|
|
#endif
|
2010-10-03 23:04:50 +02:00
|
|
|
|
2010-11-22 18:49:46 +01:00
|
|
|
typedef std::map<CefString, CefFrame*> FrameMap;
|
2010-10-03 23:04:50 +02:00
|
|
|
FrameMap frames_;
|
2011-01-29 02:42:59 +01:00
|
|
|
CefFrame* main_frame_;
|
2010-10-03 23:04:50 +02:00
|
|
|
|
|
|
|
// Unique browser ID assigned by the context.
|
|
|
|
int unique_id_;
|
|
|
|
|
|
|
|
// A temporary directory for FileSystem API.
|
|
|
|
ScopedTempDir file_system_root_;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// Implementation of CefFrame.
|
|
|
|
class CefFrameImpl : public CefThreadSafeBase<CefFrame>
|
|
|
|
{
|
|
|
|
public:
|
2011-01-29 02:42:59 +01:00
|
|
|
CefFrameImpl(CefBrowserImpl* browser, const CefString& name);
|
|
|
|
virtual ~CefFrameImpl();
|
2010-10-03 23:04:50 +02:00
|
|
|
|
|
|
|
// CefFrame methods
|
|
|
|
virtual void Undo() { browser_->Undo(this); }
|
|
|
|
virtual void Redo() { browser_->Redo(this); }
|
|
|
|
virtual void Cut() { browser_->Cut(this); }
|
|
|
|
virtual void Copy() { browser_->Copy(this); }
|
|
|
|
virtual void Paste() { browser_->Paste(this); }
|
|
|
|
virtual void Delete() { browser_->Delete(this); }
|
|
|
|
virtual void SelectAll() { browser_->SelectAll(this); }
|
|
|
|
virtual void Print() { browser_->Print(this); }
|
|
|
|
virtual void ViewSource() { browser_->ViewSource(this); }
|
2010-11-22 18:49:46 +01:00
|
|
|
virtual CefString GetSource() { return browser_->GetSource(this); }
|
|
|
|
virtual CefString GetText() { return browser_->GetText(this); }
|
2010-10-03 23:04:50 +02:00
|
|
|
virtual void LoadRequest(CefRefPtr<CefRequest> request)
|
|
|
|
{ return browser_->LoadRequest(this, request); }
|
2010-11-22 18:49:46 +01:00
|
|
|
virtual void LoadURL(const CefString& url)
|
2010-10-03 23:04:50 +02:00
|
|
|
{ return browser_->LoadURL(this, url); }
|
2010-11-22 18:49:46 +01:00
|
|
|
virtual void LoadString(const CefString& string,
|
|
|
|
const CefString& url)
|
2010-10-03 23:04:50 +02:00
|
|
|
{ return browser_->LoadString(this, string, url); }
|
|
|
|
virtual void LoadStream(CefRefPtr<CefStreamReader> stream,
|
2010-11-22 18:49:46 +01:00
|
|
|
const CefString& url)
|
2010-10-03 23:04:50 +02:00
|
|
|
{ return browser_->LoadStream(this, stream, url); }
|
2010-11-22 18:49:46 +01:00
|
|
|
virtual void ExecuteJavaScript(const CefString& jsCode,
|
|
|
|
const CefString& scriptUrl,
|
2010-10-03 23:04:50 +02:00
|
|
|
int startLine)
|
|
|
|
{ return browser_->ExecuteJavaScript(this, jsCode, scriptUrl, startLine); }
|
|
|
|
virtual bool IsMain() { return name_.empty(); }
|
|
|
|
virtual bool IsFocused();
|
2010-11-22 18:49:46 +01:00
|
|
|
virtual CefString GetName() { return name_; }
|
|
|
|
virtual CefString GetURL() { return browser_->GetURL(this); }
|
2011-02-21 23:44:06 +01:00
|
|
|
virtual CefRefPtr<CefBrowser> GetBrowser() { return browser_.get(); }
|
2010-10-03 23:04:50 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
CefRefPtr<CefBrowserImpl> browser_;
|
2010-11-22 18:49:46 +01:00
|
|
|
CefString name_;
|
2010-10-03 23:04:50 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _BROWSER_IMPL_H
|