Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc

Issue 881553003: Ignore the default zoom level for the PDF extension and print preview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/printing/print_preview_dialog_controller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
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 c9d55cfcf8009a2e413eddbe9443f1d4275309cc..c7ff1b784f8f86863d09df85913e6aee1161d90b 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
@@ -6,6 +6,7 @@
#include "base/strings/stringprintf.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/host_zoom_map.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/stream_handle.h"
#include "content/public/browser/stream_info.h"
@@ -18,6 +19,7 @@
#include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_constants.h"
#include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h"
#include "extensions/browser/process_manager.h"
+#include "extensions/common/constants.h"
#include "extensions/common/extension_messages.h"
#include "extensions/common/guest_view/guest_view_constants.h"
#include "extensions/strings/grit/extensions_strings.h"
@@ -125,8 +127,11 @@ void MimeHandlerViewGuest::CreateWebContents(
// goes under the same process as the extension.
ProcessManager* process_manager = ProcessManager::Get(browser_context());
content::SiteInstance* guest_site_instance =
- process_manager->GetSiteInstanceForURL(
- Extension::GetBaseURLFromExtensionId(GetOwnerSiteURL().host()));
+ process_manager->GetSiteInstanceForURL(stream_->handler_url());
+
+ content::HostZoomMap::Get(guest_site_instance)
raymes 2015/01/28 00:39:28 Could you add a comment about why we disable zoom
Sam McNally 2015/01/28 01:35:15 Done.
+ ->SetZoomLevelForHostAndScheme(kExtensionScheme, stream_->extension_id(),
+ 0);
WebContents::CreateParams params(browser_context(), guest_site_instance);
params.guest_delegate = this;
« no previous file with comments | « chrome/browser/printing/print_preview_dialog_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698