summaryrefslogtreecommitdiffstats
path: root/webkit/glue
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-24 06:57:10 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-24 06:57:10 +0000
commitb2528b7bc699a5ff432636ee6b13e6ea559b4ac8 (patch)
treeb7d4c65c5e3ddef8e23f176ccdd71386d62633df /webkit/glue
parent8445640d01d91669819883ac480d8e60f2d6cfa5 (diff)
downloadchromium_src-b2528b7bc699a5ff432636ee6b13e6ea559b4ac8.zip
chromium_src-b2528b7bc699a5ff432636ee6b13e6ea559b4ac8.tar.gz
chromium_src-b2528b7bc699a5ff432636ee6b13e6ea559b4ac8.tar.bz2
Move some more methods from WebViewDelegate to WebViewClient.
R=dglazkov BUG=10033 TEST=none Review URL: http://codereview.chromium.org/224010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27054 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r--webkit/glue/editor_client_impl.cc9
-rw-r--r--webkit/glue/webview_delegate.h23
-rw-r--r--webkit/glue/webview_impl.cc4
3 files changed, 6 insertions, 30 deletions
diff --git a/webkit/glue/editor_client_impl.cc b/webkit/glue/editor_client_impl.cc
index d4df2a6..888145b 100644
--- a/webkit/glue/editor_client_impl.cc
+++ b/webkit/glue/editor_client_impl.cc
@@ -630,11 +630,10 @@ void EditorClientImpl::handleKeyboardEvent(WebCore::KeyboardEvent* evt) {
ShowFormAutofillForNode(evt->target()->toNode());
}
- // Calls WebViewDelegate's HandleCurrentKeyboardEvent() first to give it a
- // chance to handle the keyboard event. Bypass handleEditingKeyboardEvent(),
- // if WebViewDelegate handles the event.
- WebViewDelegate* d = webview_->delegate();
- if ((d && d->HandleCurrentKeyboardEvent()) || handleEditingKeyboardEvent(evt))
+ // Give the embedder a chance to handle the keyboard event.
+ if ((webview_->client() &&
+ webview_->client()->handleCurrentKeyboardEvent()) ||
+ handleEditingKeyboardEvent(evt))
evt->setDefaultHandled();
}
diff --git a/webkit/glue/webview_delegate.h b/webkit/glue/webview_delegate.h
index ced0887..3d1964c 100644
--- a/webkit/glue/webview_delegate.h
+++ b/webkit/glue/webview_delegate.h
@@ -137,12 +137,6 @@ class WebViewDelegate : public WebKit::WebViewClient {
const std::wstring& value) {
}
- // Called to retrieve the provider of desktop notifications. Pointer
- // is owned by the implementation of WebViewDelegate.
- virtual WebKit::WebNotificationPresenter* GetNotificationPresenter() {
- return NULL;
- }
-
// UIDelegate --------------------------------------------------------------
// Called to display a file chooser prompt. The prompt should be pre-
@@ -208,8 +202,6 @@ class WebViewDelegate : public WebKit::WebViewClient {
const SkBitmap& image) {
}
- // History Related ---------------------------------------------------------
-
// InspectorClient ---------------------------------------------------------
virtual void UpdateInspectorSettings(const std::wstring& raw_settings) { }
@@ -220,21 +212,6 @@ class WebViewDelegate : public WebKit::WebViewClient {
return NULL;
}
- // Editor Client -----------------------------------------------------------
-
- // The "CurrentKeyboardEvent" refers to the keyboard event passed to
- // WebView's handleInputEvent method.
- //
- // This method is called in response to WebView's handleInputEvent() when
- // the default action for the current keyboard event is not suppressed by the
- // page, to give WebViewDelegate a chance to handle the keyboard event
- // specially.
- //
- // Returns true if the keyboard event was handled by WebViewDelegate.
- virtual bool HandleCurrentKeyboardEvent() {
- return false;
- }
-
protected:
~WebViewDelegate() { }
};
diff --git a/webkit/glue/webview_impl.cc b/webkit/glue/webview_impl.cc
index 5cb6a29..409d766 100644
--- a/webkit/glue/webview_impl.cc
+++ b/webkit/glue/webview_impl.cc
@@ -1876,8 +1876,8 @@ WebCore::Node* WebViewImpl::GetNodeForWindowPos(int x, int y) {
#if ENABLE(NOTIFICATIONS)
WebKit::NotificationPresenterImpl* WebViewImpl::GetNotificationPresenter() {
- if (!notification_presenter_.isInitialized() && delegate_)
- notification_presenter_.initialize(delegate_->GetNotificationPresenter());
+ if (!notification_presenter_.isInitialized() && client())
+ notification_presenter_.initialize(client()->notificationPresenter());
return &notification_presenter_;
}
#endif