summaryrefslogtreecommitdiffstats
path: root/chrome/browser/render_view_host.cc
diff options
context:
space:
mode:
authorsky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-17 18:07:02 +0000
committersky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-17 18:07:02 +0000
commit4cdac10757c9a774c3defdaf705f0d8c99290d19 (patch)
treed175d1d492401a5b96f3880df45c603fe05aee8a /chrome/browser/render_view_host.cc
parent09da32d543461c90fcf3490966e0c4a670b9a2a8 (diff)
downloadchromium_src-4cdac10757c9a774c3defdaf705f0d8c99290d19.zip
chromium_src-4cdac10757c9a774c3defdaf705f0d8c99290d19.tar.gz
chromium_src-4cdac10757c9a774c3defdaf705f0d8c99290d19.tar.bz2
Adds the anti-carpet bombing dialog. More specifically a new
EventHandler now exists between the buffered event handler and download event handler. This new event handler asks the DownloadRequestManager whether the download is allowed. This may prompt the user and then the download continues or is canceled. The DownloadRequestManager receives the request on the IO thread, forwards to the UI thread, makes the decision, then notifies back on the IO thread. BUG=3422 TEST=make sure you don't see any problems downloading content. Review URL: http://codereview.chromium.org/7479 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3543 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/render_view_host.cc')
-rw-r--r--chrome/browser/render_view_host.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/render_view_host.cc b/chrome/browser/render_view_host.cc
index 54376cf..03eec5a 100644
--- a/chrome/browser/render_view_host.cc
+++ b/chrome/browser/render_view_host.cc
@@ -1112,6 +1112,14 @@ void RenderViewHost::UnhandledInputEvent(const WebInputEvent& event) {
static_cast<const WebKeyboardEvent&>(event));
}
+void RenderViewHost::ForwardKeyboardEvent(const WebKeyboardEvent& key_event) {
+ if (key_event.type == WebKeyboardEvent::CHAR &&
+ (key_event.key_data == '\n' || key_event.key_data == ' ')) {
+ delegate_->OnEnterOrSpace();
+ }
+ RenderWidgetHost::ForwardKeyboardEvent(key_event);
+}
+
void RenderViewHost::OnMissingPluginStatus(int status) {
delegate_->OnMissingPluginStatus(status);
}