libcef: Update due to underlying chromium changes.

- Remove unnecessary resource-related glue.
- Remove methods from BrowserWebViewDelegate with default implementations in WebViewClient and WebFrameClient.


git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@64 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2009-11-05 03:48:34 +00:00
parent 7e7592b298
commit 0b9e189154
5 changed files with 3 additions and 260 deletions

View File

@ -46,3 +46,4 @@ Date | CEF Revision | Chromium Revision
2009-10-21 | /trunk@60 | /trunk@29687
2009-10-25 | /trunk@61 | /trunk@30028
2009-11-02 | /trunk@63 | /trunk@30778
2009-11-04 | /trunk@64 | /trunk@31062

View File

@ -152,14 +152,6 @@ bool GetApplicationDirectory(FilePath* path) {
return PathService::Get(base::DIR_EXE, path);
}
GURL GetInspectorURL() {
return GURL("cef-resource://inspector/inspector.html");
}
std::string GetUIResourceProtocol() {
return "cef-resource";
}
bool GetExeDirectory(FilePath* path) {
return PathService::Get(base::DIR_EXE, path);
}

View File

@ -43,10 +43,6 @@ class BrowserWebKitInit : public webkit_glue::WebKitClientImpl {
WebKit::initialize(this);
WebKit::setLayoutTestMode(false);
WebKit::WebSecurityPolicy::registerURLSchemeAsLocal(
ASCIIToUTF16(webkit_glue::GetUIResourceProtocol()));
WebKit::WebSecurityPolicy::registerURLSchemeAsNoAccess(
ASCIIToUTF16(webkit_glue::GetUIResourceProtocol()));
WebKit::WebScriptController::registerExtension(
extensions_v8::GearsExtension::Get());
WebKit::WebScriptController::registerExtension(

View File

@ -150,13 +150,6 @@ void BrowserWebViewDelegate::didAddMessageToConsole(
<< ")";
}
void BrowserWebViewDelegate::printPage(WebFrame* frame) {
}
WebKit::WebNotificationPresenter* BrowserWebViewDelegate::notificationPresenter() {
return NULL;
}
void BrowserWebViewDelegate::didStartLoading() {
// clear the title so we can tell if it wasn't provided by the page
browser_->UIT_SetTitle(std::wstring());
@ -229,46 +222,6 @@ 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() {
}
bool BrowserWebViewDelegate::handleCurrentKeyboardEvent() {
return false;
}
void BrowserWebViewDelegate::spellCheck(const WebKit::WebString& text,
int& offset, int& length) {
}
WebString BrowserWebViewDelegate::autoCorrectWord(const WebString& word) {
// Dummy implementation.
return word;
}
void BrowserWebViewDelegate::showSpellingUI(bool show) {
}
bool BrowserWebViewDelegate::isShowingSpellingUI() {
return false;
}
void BrowserWebViewDelegate::updateSpellingUIWithMisspelledWord(
const WebKit::WebString& word) {
}
bool BrowserWebViewDelegate::runFileChooser(
bool multi_select, const WebKit::WebString& title,
const WebKit::WebString& initial_value,
@ -364,10 +317,6 @@ void BrowserWebViewDelegate::startDragging(
browser_->GetWebView()->dragSourceSystemDragEnded();
}
bool BrowserWebViewDelegate::acceptsLoadDrops() {
return true;
}
void BrowserWebViewDelegate::focusNext() {
CefRefPtr<CefHandler> handler = browser_->GetHandler();
if(handler.get()) {
@ -401,29 +350,6 @@ int BrowserWebViewDelegate::historyForwardListCount() {
- current_index - 1;
}
void BrowserWebViewDelegate::didAddHistoryItem() {
}
void BrowserWebViewDelegate::focusAccessibilityObject(
const WebKit::WebAccessibilityObject& object) {
}
void BrowserWebViewDelegate::didUpdateInspectorSettings() {
}
WebKit::WebDevToolsAgentClient* BrowserWebViewDelegate::devToolsAgentClient() {
return NULL;
}
void BrowserWebViewDelegate::queryAutofillSuggestions(
const WebKit::WebNode&, const WebKit::WebString& name,
const WebKit::WebString& value) {
}
void BrowserWebViewDelegate::removeAutofillSuggestions(
const WebKit::WebString& name, const WebKit::WebString& value) {
}
// WebWidgetClient -----------------------------------------------------------
void BrowserWebViewDelegate::didInvalidateRect(const WebRect& rect) {
@ -464,11 +390,6 @@ WebPlugin* BrowserWebViewDelegate::createPlugin(
return new webkit_glue::WebPluginImpl(frame, params, AsWeakPtr());
}
WebWorker* BrowserWebViewDelegate::createWorker(
WebFrame* frame, WebWorkerClient* client) {
return NULL;
}
WebMediaPlayer* BrowserWebViewDelegate::createMediaPlayer(
WebFrame* frame, WebMediaPlayerClient* client) {
scoped_refptr<media::FilterFactoryCollection> factory =
@ -497,9 +418,6 @@ WebMediaPlayer* BrowserWebViewDelegate::createMediaPlayer(
return new webkit_glue::WebMediaPlayerImpl(client, factory);
}
void BrowserWebViewDelegate::willClose(WebFrame* frame) {
}
void BrowserWebViewDelegate::loadURLExternally(
WebFrame* frame, const WebURLRequest& request,
WebNavigationPolicy policy) {
@ -554,11 +472,6 @@ WebNavigationPolicy BrowserWebViewDelegate::decidePolicyForNavigation(
return result;
}
bool BrowserWebViewDelegate::canHandleRequest(
WebFrame* frame, const WebURLRequest& request) {
return true;
}
WebURLError BrowserWebViewDelegate::cannotHandleRequestError(
WebFrame* frame, const WebURLRequest& request) {
WebURLError error;
@ -577,26 +490,6 @@ WebURLError BrowserWebViewDelegate::cancelledError(
return error;
}
void BrowserWebViewDelegate::unableToImplementPolicyWithError(
WebFrame* frame, const WebURLError& error) {
}
void BrowserWebViewDelegate::willSubmitForm(WebFrame* frame, const WebForm&) {
// Ignore
}
void BrowserWebViewDelegate::willPerformClientRedirect(
WebFrame* frame, const WebURL& from, const WebURL& to,
double interval, double fire_time) {
}
void BrowserWebViewDelegate::didCancelClientRedirect(WebFrame* frame) {
}
void BrowserWebViewDelegate::didCompleteClientRedirect(
WebFrame* frame, const WebURL& from) {
}
void BrowserWebViewDelegate::didCreateDataSource(
WebFrame* frame, WebDataSource* ds) {
ds->setExtraData(pending_extra_data_.release());
@ -655,12 +548,6 @@ void BrowserWebViewDelegate::didFailProvisionalLoad(
error_text, GURL("testshell-error:"), error.unreachableURL, replace);
}
void BrowserWebViewDelegate::didReceiveDocumentData(
WebFrame* frame, const char* data, size_t length,
bool& preventDefault) {
// Ignore
}
void BrowserWebViewDelegate::didCommitProvisionalLoad(
WebFrame* frame, bool is_new_navigation) {
UpdateForCommittedLoad(frame, is_new_navigation);
@ -687,10 +574,6 @@ void BrowserWebViewDelegate::didClearWindowObject(WebFrame* frame) {
}
}
void BrowserWebViewDelegate::didCreateDocumentElement(WebFrame* frame) {
// Ignore
}
void BrowserWebViewDelegate::didReceiveTitle(
WebFrame* frame, const WebString& title) {
std::wstring wtitle = UTF16ToWideHack(title);
@ -703,12 +586,6 @@ void BrowserWebViewDelegate::didReceiveTitle(
}
}
void BrowserWebViewDelegate::didFinishDocumentLoad(WebFrame* frame) {
}
void BrowserWebViewDelegate::didHandleOnloadEvents(WebFrame* frame) {
}
void BrowserWebViewDelegate::didFailLoad(
WebFrame* frame, const WebURLError& error) {
LocationChangeDone(frame);
@ -730,10 +607,6 @@ void BrowserWebViewDelegate::didChangeLocationWithinPage(
UpdateForCommittedLoad(frame, is_new_navigation);
}
void BrowserWebViewDelegate::assignIdentifierToRequest(
WebFrame* frame, unsigned identifier, const WebURLRequest& request) {
}
void BrowserWebViewDelegate::willSendRequest(
WebFrame* frame, unsigned identifier, WebURLRequest& request,
const WebURLResponse& redirect_response) {
@ -748,55 +621,6 @@ void BrowserWebViewDelegate::willSendRequest(
request.setRequestorID(browser_->UIT_GetUniqueID());
}
void BrowserWebViewDelegate::didReceiveResponse(
WebFrame* frame, unsigned identifier, const WebURLResponse& response) {
}
void BrowserWebViewDelegate::didFinishResourceLoad(
WebFrame* frame, unsigned identifier) {
}
void BrowserWebViewDelegate::didFailResourceLoad(
WebFrame* frame, unsigned identifier, const WebURLError& error) {
}
void BrowserWebViewDelegate::didLoadResourceFromMemoryCache(
WebFrame* frame, const WebURLRequest&,
const WebURLResponse&) {
}
void BrowserWebViewDelegate::didDisplayInsecureContent(WebFrame* frame) {
}
void BrowserWebViewDelegate::didRunInsecureContent(
WebFrame* frame, const WebKit::WebSecurityOrigin& origin) {
}
void BrowserWebViewDelegate::didExhaustMemoryAvailableForScript(
WebFrame* frame) {
}
void BrowserWebViewDelegate::didCreateScriptContext(WebKit::WebFrame* frame) {
}
void BrowserWebViewDelegate::didDestroyScriptContext(WebKit::WebFrame* frame) {
}
void BrowserWebViewDelegate::didCreateIsolatedScriptContext(
WebKit::WebFrame* frame) {
}
void BrowserWebViewDelegate::didChangeContentsSize(
WebFrame* frame, const WebSize&) {
}
void BrowserWebViewDelegate::reportFindInPageMatchCount(
int identifier, int count, bool final_update) {
}
void BrowserWebViewDelegate::reportFindInPageSelection(
int identifier, int ordinal, const WebKit::WebRect& selection) {
}
// Public methods ------------------------------------------------------------

View File

@ -51,8 +51,6 @@ class BrowserWebViewDelegate : public WebKit::WebViewClient,
virtual void didAddMessageToConsole(
const WebKit::WebConsoleMessage& message,
const WebKit::WebString& source_name, unsigned source_line);
virtual void printPage(WebKit::WebFrame* frame);
virtual WebKit::WebNotificationPresenter* notificationPresenter();
virtual void didStartLoading();
virtual void didStopLoading();
virtual bool shouldBeginEditing(const WebKit::WebRange& range);
@ -71,21 +69,6 @@ class BrowserWebViewDelegate : public WebKit::WebViewClient,
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 bool handleCurrentKeyboardEvent();
virtual void spellCheck(
const WebKit::WebString& text, int& offset, int& length);
virtual WebKit::WebString autoCorrectWord(
const WebKit::WebString& misspelled_word);
virtual void showSpellingUI(bool show);
virtual bool isShowingSpellingUI();
virtual void updateSpellingUIWithMisspelledWord(
const WebKit::WebString& word);
virtual bool runFileChooser(
bool multi_select, const WebKit::WebString& title,
const WebKit::WebString& initial_value,
@ -109,22 +92,12 @@ class BrowserWebViewDelegate : public WebKit::WebViewClient,
virtual void startDragging(
const WebKit::WebPoint& from, const WebKit::WebDragData& data,
WebKit::WebDragOperationsMask mask);
virtual bool acceptsLoadDrops();
virtual bool acceptsLoadDrops() { return true; }
virtual void focusNext();
virtual void focusPrevious();
virtual void navigateBackForwardSoon(int offset);
virtual int historyBackListCount();
virtual int historyForwardListCount();
virtual void didAddHistoryItem();
virtual void focusAccessibilityObject(
const WebKit::WebAccessibilityObject& object);
virtual void didUpdateInspectorSettings();
virtual WebKit::WebDevToolsAgentClient* devToolsAgentClient();
virtual void queryAutofillSuggestions(
const WebKit::WebNode&, const WebKit::WebString& name,
const WebKit::WebString& value);
virtual void removeAutofillSuggestions(
const WebKit::WebString& name, const WebKit::WebString& value);
// WebKit::WebWidgetClient
virtual void didInvalidateRect(const WebKit::WebRect& rect);
@ -145,11 +118,8 @@ class BrowserWebViewDelegate : public WebKit::WebViewClient,
// WebKit::WebFrameClient
virtual WebKit::WebPlugin* createPlugin(
WebKit::WebFrame*, const WebKit::WebPluginParams&);
virtual WebKit::WebWorker* createWorker(
WebKit::WebFrame*, WebKit::WebWorkerClient*);
virtual WebKit::WebMediaPlayer* createMediaPlayer(
WebKit::WebFrame*, WebKit::WebMediaPlayerClient*);
virtual void willClose(WebKit::WebFrame*);
virtual void loadURLExternally(
WebKit::WebFrame*, const WebKit::WebURLRequest&,
WebKit::WebNavigationPolicy);
@ -158,70 +128,30 @@ class BrowserWebViewDelegate : public WebKit::WebViewClient,
WebKit::WebNavigationType, const WebKit::WebNode&,
WebKit::WebNavigationPolicy default_policy, bool isRedirect);
virtual bool canHandleRequest(
WebKit::WebFrame*, const WebKit::WebURLRequest&);
WebKit::WebFrame*, const WebKit::WebURLRequest&) { return true; }
virtual WebKit::WebURLError cannotHandleRequestError(
WebKit::WebFrame*, const WebKit::WebURLRequest& request);
virtual WebKit::WebURLError cancelledError(
WebKit::WebFrame*, const WebKit::WebURLRequest& request);
virtual void unableToImplementPolicyWithError(
WebKit::WebFrame*, const WebKit::WebURLError&);
virtual void willSubmitForm(WebKit::WebFrame*, const WebKit::WebForm&);
virtual void willPerformClientRedirect(
WebKit::WebFrame*, const WebKit::WebURL& from, const WebKit::WebURL& to,
double interval, double fire_time);
virtual void didCancelClientRedirect(WebKit::WebFrame*);
virtual void didCompleteClientRedirect(
WebKit::WebFrame*, const WebKit::WebURL& from);
virtual void didCreateDataSource(
WebKit::WebFrame*, WebKit::WebDataSource*);
virtual void didStartProvisionalLoad(WebKit::WebFrame*);
virtual void didReceiveServerRedirectForProvisionalLoad(WebKit::WebFrame*);
virtual void didFailProvisionalLoad(
WebKit::WebFrame*, const WebKit::WebURLError&);
virtual void didReceiveDocumentData(
WebKit::WebFrame*, const char* data, size_t length,
bool& preventDefault);
virtual void didCommitProvisionalLoad(
WebKit::WebFrame*, bool is_new_navigation);
virtual void didClearWindowObject(WebKit::WebFrame*);
virtual void didCreateDocumentElement(WebKit::WebFrame*);
virtual void didReceiveTitle(
WebKit::WebFrame*, const WebKit::WebString& title);
virtual void didFinishDocumentLoad(WebKit::WebFrame*);
virtual void didHandleOnloadEvents(WebKit::WebFrame*);
virtual void didFailLoad(
WebKit::WebFrame*, const WebKit::WebURLError&);
virtual void didFinishLoad(WebKit::WebFrame*);
virtual void didChangeLocationWithinPage(
WebKit::WebFrame*, bool isNewNavigation);
virtual void didUpdateCurrentHistoryItem(WebKit::WebFrame*) {}
virtual void assignIdentifierToRequest(
WebKit::WebFrame*, unsigned identifier, const WebKit::WebURLRequest&);
virtual void willSendRequest(
WebKit::WebFrame*, unsigned identifier, WebKit::WebURLRequest&,
const WebKit::WebURLResponse& redirectResponse);
virtual void didReceiveResponse(
WebKit::WebFrame*, unsigned identifier, const WebKit::WebURLResponse&);
virtual void didFinishResourceLoad(
WebKit::WebFrame*, unsigned identifier);
virtual void didFailResourceLoad(
WebKit::WebFrame*, unsigned identifier, const WebKit::WebURLError&);
virtual void didLoadResourceFromMemoryCache(
WebKit::WebFrame*, const WebKit::WebURLRequest&,
const WebKit::WebURLResponse&);
virtual void didDisplayInsecureContent(WebKit::WebFrame* frame);
virtual void didRunInsecureContent(
WebKit::WebFrame* frame, const WebKit::WebSecurityOrigin& origin);
virtual void didExhaustMemoryAvailableForScript(WebKit::WebFrame*);
virtual void didCreateScriptContext(WebKit::WebFrame* frame);
virtual void didDestroyScriptContext(WebKit::WebFrame* frame);
virtual void didCreateIsolatedScriptContext(WebKit::WebFrame* frame);
virtual void didChangeContentsSize(
WebKit::WebFrame*, const WebKit::WebSize&);
virtual void reportFindInPageMatchCount(
int identifier, int count, bool final_update);
virtual void reportFindInPageSelection(
int identifier, int ordinal, const WebKit::WebRect& selection);
// webkit_glue::WebPluginPageDelegate
virtual webkit_glue::WebPluginDelegate* CreatePluginDelegate(