summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorraymes <raymes@chromium.org>2015-02-16 15:23:19 -0800
committerCommit bot <commit-bot@chromium.org>2015-02-16 23:24:12 +0000
commitc937ae9c1456a34ecf25d22b0395ef71582b4b66 (patch)
tree8c576523790aaaca9dfb73763e26af145f2e5e6b /extensions
parentb5be20042269ca153e7986ef599b6548a973fc79 (diff)
downloadchromium_src-c937ae9c1456a34ecf25d22b0395ef71582b4b66.zip
chromium_src-c937ae9c1456a34ecf25d22b0395ef71582b4b66.tar.gz
chromium_src-c937ae9c1456a34ecf25d22b0395ef71582b4b66.tar.bz2
Make JavaScript dialogs work for PDFs
This implements GetJavaScriptDialogManager in MimeHandlerViewGuest to allow JS dialogs to work for PDFs. BUG=458457 Review URL: https://codereview.chromium.org/928923003 Cr-Commit-Position: refs/heads/master@{#316510}
Diffstat (limited to 'extensions')
-rw-r--r--extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc7
-rw-r--r--extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
index 85a30cd..a15605c 100644
--- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
+++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
@@ -210,6 +210,13 @@ bool MimeHandlerViewGuest::PreHandleGestureEvent(
return false;
}
+content::JavaScriptDialogManager*
+MimeHandlerViewGuest::GetJavaScriptDialogManager(
+ WebContents* source) {
+ return owner_web_contents()->GetDelegate()->GetJavaScriptDialogManager(
+ web_contents());
+}
+
void MimeHandlerViewGuest::FindReply(content::WebContents* web_contents,
int request_id,
int number_of_matches,
diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
index 823f68cd..b9eb252 100644
--- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
+++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
@@ -83,6 +83,8 @@ class MimeHandlerViewGuest : public GuestView<MimeHandlerViewGuest>,
bool HandleContextMenu(const content::ContextMenuParams& params) override;
bool PreHandleGestureEvent(content::WebContents* source,
const blink::WebGestureEvent& event) override;
+ content::JavaScriptDialogManager* GetJavaScriptDialogManager(
+ content::WebContents* source) override;
void FindReply(content::WebContents* web_contents,
int request_id,
int number_of_matches,