mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add global and per-browser settings (issue #145).
This exposes the following new capabilities: - Ability to disable drag & drop from other windows. - Ability to specify additional plugin search paths. - Ability to customize WebPreferences values, including enabling cross-site scripting. - Ability to set User-Agent or product version. - Ability to set default locale. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@144 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
#include "cef_context.h"
|
||||
#include "browser_impl.h"
|
||||
#include "browser_settings.h"
|
||||
#include "browser_webview_mac.h"
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
@@ -14,6 +15,7 @@
|
||||
#include "third_party/WebKit/WebKit/chromium/public/WebRect.h"
|
||||
#include "third_party/WebKit/WebKit/chromium/public/WebSize.h"
|
||||
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
|
||||
#include "webkit/glue/webpreferences.h"
|
||||
|
||||
using WebKit::WebRect;
|
||||
using WebKit::WebSize;
|
||||
@@ -44,10 +46,13 @@ void CefBrowserImpl::UIT_CreateBrowser(const std::wstring& url)
|
||||
gfx::Rect contentRect(window_info_.m_x, window_info_.m_y,
|
||||
window_info_.m_nWidth, window_info_.m_nHeight);
|
||||
|
||||
WebPreferences prefs;
|
||||
BrowserToWebSettings(settings_, prefs);
|
||||
|
||||
// Create the webview host object
|
||||
webviewhost_.reset(
|
||||
WebViewHost::Create(parentView, contentRect, delegate_.get(),
|
||||
NULL, *_Context->web_preferences()));
|
||||
NULL, prefs));
|
||||
delegate_->RegisterDragDrop();
|
||||
|
||||
BrowserWebView* browserView = (BrowserWebView*)webviewhost_->view_handle();
|
||||
|
Reference in New Issue
Block a user