libcef: Update due to underlying chromium changes.
- WebEditingClient merged into WebViewClient requiring changes to BrowserWebViewDelegate. - Remove webkit_glue_plugins.patch for RegisterInternalPlugin() issue 173107 which has been committed as Chromium rev 26595. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@48 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
51181e1004
commit
07e81ab0a0
|
@ -37,3 +37,6 @@ Date | CEF Revision | Chromium Revision
|
|||
2009-08-20 | /trunk@35 | /trunk@23814
|
||||
2009-08-25 | /trunk@41 | /trunk@24210
|
||||
2009-09-17 | /trunk@42 | /trunk@26432
|
||||
After syncing to rev 26432 you must manually run 'gclient runhooks --force'.
|
||||
Earlier and later revisions do not have this requirement.
|
||||
2009-09-22 | /trunk@48 | /trunk@26790
|
||||
|
|
|
@ -175,6 +175,12 @@ bool IsDefaultPluginEnabled() {
|
|||
return false;
|
||||
}
|
||||
|
||||
bool IsProtocolSupportedForMedia(const GURL& url) {
|
||||
if (url.SchemeIsFile() || url.SchemeIs("http") || url.SchemeIs("https"))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
std::wstring GetWebKitLocale() {
|
||||
return L"en-US";
|
||||
}
|
||||
|
|
|
@ -88,6 +88,7 @@ using WebKit::WebPopupMenu;
|
|||
using WebKit::WebRange;
|
||||
using WebKit::WebRect;
|
||||
using WebKit::WebScreenInfo;
|
||||
using WebKit::WebSecurityOrigin;
|
||||
using WebKit::WebSize;
|
||||
using WebKit::WebString;
|
||||
using WebKit::WebTextAffinity;
|
||||
|
@ -178,6 +179,66 @@ void BrowserWebViewDelegate::didStopLoading() {
|
|||
}
|
||||
}
|
||||
|
||||
bool BrowserWebViewDelegate::shouldBeginEditing(const WebRange& range) {
|
||||
return browser_->UIT_AllowEditing();
|
||||
}
|
||||
|
||||
bool BrowserWebViewDelegate::shouldEndEditing(const WebRange& range) {
|
||||
return browser_->UIT_AllowEditing();
|
||||
}
|
||||
|
||||
bool BrowserWebViewDelegate::shouldInsertNode(const WebNode& node,
|
||||
const WebRange& range,
|
||||
WebEditingAction action) {
|
||||
return browser_->UIT_AllowEditing();
|
||||
}
|
||||
|
||||
bool BrowserWebViewDelegate::shouldInsertText(const WebString& text,
|
||||
const WebRange& range,
|
||||
WebEditingAction action) {
|
||||
return browser_->UIT_AllowEditing();
|
||||
}
|
||||
|
||||
bool BrowserWebViewDelegate::shouldChangeSelectedRange(const WebRange& from_range,
|
||||
const WebRange& to_range,
|
||||
WebTextAffinity affinity,
|
||||
bool still_selecting) {
|
||||
return browser_->UIT_AllowEditing();
|
||||
}
|
||||
|
||||
bool BrowserWebViewDelegate::shouldDeleteRange(const WebRange& range) {
|
||||
return browser_->UIT_AllowEditing();
|
||||
}
|
||||
|
||||
bool BrowserWebViewDelegate::shouldApplyStyle(const WebString& style,
|
||||
const WebRange& range) {
|
||||
return browser_->UIT_AllowEditing();
|
||||
}
|
||||
|
||||
bool BrowserWebViewDelegate::isSmartInsertDeleteEnabled() {
|
||||
return smart_insert_delete_enabled_;
|
||||
}
|
||||
|
||||
bool BrowserWebViewDelegate::isSelectTrailingWhitespaceEnabled() {
|
||||
return select_trailing_whitespace_enabled_;
|
||||
}
|
||||
|
||||
void BrowserWebViewDelegate::didBeginEditing() {
|
||||
}
|
||||
|
||||
void BrowserWebViewDelegate::didChangeSelection(bool is_empty_selection) {
|
||||
}
|
||||
|
||||
void BrowserWebViewDelegate::didChangeContents() {
|
||||
}
|
||||
|
||||
void BrowserWebViewDelegate::didExecuteCommand(
|
||||
const WebKit::WebString& command_name) {
|
||||
}
|
||||
|
||||
void BrowserWebViewDelegate::didEndEditing() {
|
||||
}
|
||||
|
||||
void BrowserWebViewDelegate::runModalAlertDialog(
|
||||
WebFrame* frame, const WebString& message) {
|
||||
std::wstring messageStr = UTF16ToWideHack(message);
|
||||
|
@ -332,66 +393,6 @@ WebScreenInfo BrowserWebViewDelegate::screenInfo() {
|
|||
return WebScreenInfo();
|
||||
}
|
||||
|
||||
// WebEditingClient ----------------------------------------------------------
|
||||
// The output from these methods in layout test mode should match that
|
||||
// expected by the layout tests. See EditingDelegate.m in DumpRenderTree.
|
||||
|
||||
bool BrowserWebViewDelegate::shouldBeginEditing(const WebRange& range) {
|
||||
return browser_->UIT_AllowEditing();
|
||||
}
|
||||
|
||||
bool BrowserWebViewDelegate::shouldEndEditing(const WebRange& range) {
|
||||
return browser_->UIT_AllowEditing();
|
||||
}
|
||||
|
||||
bool BrowserWebViewDelegate::shouldInsertNode(const WebNode& node,
|
||||
const WebRange& range,
|
||||
WebEditingAction action) {
|
||||
return browser_->UIT_AllowEditing();
|
||||
}
|
||||
|
||||
bool BrowserWebViewDelegate::shouldInsertText(const WebString& text,
|
||||
const WebRange& range,
|
||||
WebEditingAction action) {
|
||||
return browser_->UIT_AllowEditing();
|
||||
}
|
||||
|
||||
bool BrowserWebViewDelegate::shouldChangeSelectedRange(const WebRange& from_range,
|
||||
const WebRange& to_range,
|
||||
WebTextAffinity affinity,
|
||||
bool still_selecting) {
|
||||
return browser_->UIT_AllowEditing();
|
||||
}
|
||||
|
||||
bool BrowserWebViewDelegate::shouldDeleteRange(const WebRange& range) {
|
||||
return browser_->UIT_AllowEditing();
|
||||
}
|
||||
|
||||
bool BrowserWebViewDelegate::shouldApplyStyle(const WebString& style,
|
||||
const WebRange& range) {
|
||||
return browser_->UIT_AllowEditing();
|
||||
}
|
||||
|
||||
bool BrowserWebViewDelegate::isSmartInsertDeleteEnabled() {
|
||||
return smart_insert_delete_enabled_;
|
||||
}
|
||||
|
||||
bool BrowserWebViewDelegate::isSelectTrailingWhitespaceEnabled() {
|
||||
return select_trailing_whitespace_enabled_;
|
||||
}
|
||||
|
||||
void BrowserWebViewDelegate::didBeginEditing() {
|
||||
}
|
||||
|
||||
void BrowserWebViewDelegate::didChangeSelection(bool is_empty_selection) {
|
||||
}
|
||||
|
||||
void BrowserWebViewDelegate::didChangeContents() {
|
||||
}
|
||||
|
||||
void BrowserWebViewDelegate::didEndEditing() {
|
||||
}
|
||||
|
||||
// WebFrameClient ------------------------------------------------------------
|
||||
|
||||
WebPlugin* BrowserWebViewDelegate::createPlugin(
|
||||
|
@ -670,7 +671,7 @@ void BrowserWebViewDelegate::didDisplayInsecureContent(WebFrame* frame) {
|
|||
}
|
||||
|
||||
void BrowserWebViewDelegate::didRunInsecureContent(
|
||||
WebFrame* frame, const WebString& security_origin) {
|
||||
WebFrame* frame, const WebKit::WebSecurityOrigin& origin) {
|
||||
}
|
||||
|
||||
void BrowserWebViewDelegate::didExhaustMemoryAvailableForScript(WebFrame* frame) {
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#include "base/basictypes.h"
|
||||
#include "base/scoped_ptr.h"
|
||||
#include "base/weak_ptr.h"
|
||||
#include "webkit/api/public/WebEditingClient.h"
|
||||
#include "webkit/api/public/WebFrameClient.h"
|
||||
#include "webkit/glue/webcursor.h"
|
||||
#include "webkit/glue/webplugin_page_delegate.h"
|
||||
|
@ -39,7 +38,6 @@ class GURL;
|
|||
class WebWidgetHost;
|
||||
|
||||
class BrowserWebViewDelegate : public WebViewDelegate,
|
||||
public WebKit::WebEditingClient,
|
||||
public WebKit::WebFrameClient,
|
||||
public webkit_glue::WebPluginPageDelegate,
|
||||
public base::SupportsWeakPtr<BrowserWebViewDelegate> {
|
||||
|
@ -71,6 +69,28 @@ class BrowserWebViewDelegate : public WebViewDelegate,
|
|||
virtual void printPage(WebKit::WebFrame* frame);
|
||||
virtual void didStartLoading();
|
||||
virtual void didStopLoading();
|
||||
virtual bool shouldBeginEditing(const WebKit::WebRange& range);
|
||||
virtual bool shouldEndEditing(const WebKit::WebRange& range);
|
||||
virtual bool shouldInsertNode(
|
||||
const WebKit::WebNode& node, const WebKit::WebRange& range,
|
||||
WebKit::WebEditingAction action);
|
||||
virtual bool shouldInsertText(
|
||||
const WebKit::WebString& text, const WebKit::WebRange& range,
|
||||
WebKit::WebEditingAction action);
|
||||
virtual bool shouldChangeSelectedRange(
|
||||
const WebKit::WebRange& from, const WebKit::WebRange& to,
|
||||
WebKit::WebTextAffinity affinity, bool still_selecting);
|
||||
virtual bool shouldDeleteRange(const WebKit::WebRange& range);
|
||||
virtual bool shouldApplyStyle(
|
||||
const WebKit::WebString& style, const WebKit::WebRange& range);
|
||||
virtual bool isSmartInsertDeleteEnabled();
|
||||
virtual bool isSelectTrailingWhitespaceEnabled();
|
||||
virtual void setInputMethodEnabled(bool enabled) {}
|
||||
virtual void didBeginEditing();
|
||||
virtual void didChangeSelection(bool is_selection_empty);
|
||||
virtual void didChangeContents();
|
||||
virtual void didExecuteCommand(const WebKit::WebString& command_name);
|
||||
virtual void didEndEditing();
|
||||
virtual void runModalAlertDialog(
|
||||
WebKit::WebFrame* frame, const WebKit::WebString& message);
|
||||
virtual bool runModalConfirmDialog(
|
||||
|
@ -110,30 +130,6 @@ class BrowserWebViewDelegate : public WebViewDelegate,
|
|||
virtual WebKit::WebRect windowResizerRect();
|
||||
virtual WebKit::WebScreenInfo screenInfo();
|
||||
|
||||
// WebKit::WebEditingClient
|
||||
virtual bool shouldBeginEditing(const WebKit::WebRange& range);
|
||||
virtual bool shouldEndEditing(const WebKit::WebRange& range);
|
||||
virtual bool shouldInsertNode(
|
||||
const WebKit::WebNode& node, const WebKit::WebRange& range,
|
||||
WebKit::WebEditingAction action);
|
||||
virtual bool shouldInsertText(
|
||||
const WebKit::WebString& text, const WebKit::WebRange& range,
|
||||
WebKit::WebEditingAction action);
|
||||
virtual bool shouldChangeSelectedRange(
|
||||
const WebKit::WebRange& from, const WebKit::WebRange& to,
|
||||
WebKit::WebTextAffinity affinity, bool still_selecting);
|
||||
virtual bool shouldDeleteRange(const WebKit::WebRange& range);
|
||||
virtual bool shouldApplyStyle(
|
||||
const WebKit::WebString& style, const WebKit::WebRange& range);
|
||||
virtual bool isSmartInsertDeleteEnabled();
|
||||
virtual bool isSelectTrailingWhitespaceEnabled();
|
||||
virtual void setInputMethodEnabled(bool enabled) {}
|
||||
virtual void didBeginEditing();
|
||||
virtual void didChangeSelection(bool is_selection_empty);
|
||||
virtual void didChangeContents();
|
||||
virtual void didExecuteCommand(const WebKit::WebString& command_name) {}
|
||||
virtual void didEndEditing();
|
||||
|
||||
// WebKit::WebFrameClient
|
||||
virtual WebKit::WebPlugin* createPlugin(
|
||||
WebKit::WebFrame*, const WebKit::WebPluginParams&);
|
||||
|
@ -195,7 +191,7 @@ class BrowserWebViewDelegate : public WebViewDelegate,
|
|||
const WebKit::WebURLResponse&);
|
||||
virtual void didDisplayInsecureContent(WebKit::WebFrame* frame);
|
||||
virtual void didRunInsecureContent(
|
||||
WebKit::WebFrame* frame, const WebKit::WebString& security_origin);
|
||||
WebKit::WebFrame* frame, const WebKit::WebSecurityOrigin& origin);
|
||||
virtual void didExhaustMemoryAvailableForScript(WebKit::WebFrame*);
|
||||
virtual void didChangeContentsSize(
|
||||
WebKit::WebFrame*, const WebKit::WebSize&);
|
||||
|
|
|
@ -40,7 +40,7 @@ WebViewHost* WebViewHost::Create(HWND parent_view,
|
|||
GetModuleHandle(NULL), NULL);
|
||||
win_util::SetWindowUserData(host->view_, host);
|
||||
|
||||
host->webwidget_ = WebView::Create(delegate, delegate);
|
||||
host->webwidget_ = WebView::Create(delegate);
|
||||
prefs.Apply(host->webview());
|
||||
host->webview()->InitializeMainFrame(delegate);
|
||||
|
||||
|
|
|
@ -3,6 +3,4 @@
|
|||
# file entry should be proceeded by the code review or bug report link that it
|
||||
# relates to.
|
||||
patches = {
|
||||
# http://codereview.chromium.org/173107
|
||||
"webkit_glue_plugins" : "../../webkit/glue/plugins/"
|
||||
}
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
Index: plugin_list.cc
|
||||
===================================================================
|
||||
--- plugin_list.cc (revision 26359)
|
||||
+++ plugin_list.cc (working copy)
|
||||
@@ -141,6 +141,7 @@
|
||||
// other methods if they're called on other threads.
|
||||
std::vector<FilePath> extra_plugin_paths;
|
||||
std::vector<FilePath> extra_plugin_dirs;
|
||||
+ std::vector<PluginVersionInfo> internal_plugins;
|
||||
{
|
||||
AutoLock lock(lock_);
|
||||
if (plugins_loaded_ && !refresh)
|
||||
@@ -148,6 +149,7 @@
|
||||
|
||||
extra_plugin_paths = extra_plugin_paths_;
|
||||
extra_plugin_dirs = extra_plugin_dirs_;
|
||||
+ internal_plugins = internal_plugins_;
|
||||
}
|
||||
|
||||
base::TimeTicks start_time = base::TimeTicks::Now();
|
||||
@@ -157,6 +159,14 @@
|
||||
std::vector<FilePath> directories_to_scan;
|
||||
GetPluginDirectories(&directories_to_scan);
|
||||
|
||||
+ for (size_t i = 0; i < internal_plugins.size(); ++i) {
|
||||
+#if defined(OS_WIN)
|
||||
+ if (internal_plugins[i].path.value() == kDefaultPluginLibraryName)
|
||||
+ continue;
|
||||
+#endif
|
||||
+ LoadPlugin(internal_plugins[i].path, &new_plugins);
|
||||
+ }
|
||||
+
|
||||
for (size_t i = 0; i < extra_plugin_paths.size(); ++i)
|
||||
LoadPlugin(extra_plugin_paths[i], &new_plugins);
|
||||
|
Loading…
Reference in New Issue