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

Unified Diff: chrome/browser/ui/panels/panel_host.cc

Issue 373733003: Make sure WebContents passed to chrome_page_zoom::Zoom() have a ZoomController. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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
Index: chrome/browser/ui/panels/panel_host.cc
diff --git a/chrome/browser/ui/panels/panel_host.cc b/chrome/browser/ui/panels/panel_host.cc
index 670ae731fc4749e4ec88b0c47d1073fa1ee294a3..907b11a08501207df4812b0ba7d7f692b7b5ccb6 100644
--- a/chrome/browser/ui/panels/panel_host.cc
+++ b/chrome/browser/ui/panels/panel_host.cc
@@ -17,6 +17,7 @@
#include "chrome/browser/ui/browser_navigator.h"
#include "chrome/browser/ui/panels/panel.h"
#include "chrome/browser/ui/prefs/prefs_tab_helper.h"
+#include "chrome/browser/ui/zoom/zoom_controller.h"
#include "content/public/browser/invalidate_type.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/notification_service.h"
@@ -54,6 +55,9 @@ void PanelHost::Init(const GURL& url) {
web_contents_.reset(content::WebContents::Create(create_params));
extensions::SetViewType(web_contents_.get(), extensions::VIEW_TYPE_PANEL);
web_contents_->SetDelegate(this);
+ // web_contents_ may be passed to chrome_page_zoom::Zoom(), so it needs
+ // a ZoomController.
+ ZoomController::CreateForWebContents(web_contents_.get());
content::WebContentsObserver::Observe(web_contents_.get());
// Needed to give the web contents a Tab ID. Extension APIs
« chrome/browser/chrome_page_zoom.cc ('K') | « chrome/browser/devtools/devtools_window.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698