Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / panels / panel_host.cc
index 670ae73..ed6b629 100644 (file)
@@ -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
@@ -122,7 +126,7 @@ content::WebContents* PanelHost::OpenURLFromTab(
 }
 
 void PanelHost::NavigationStateChanged(const content::WebContents* source,
-                                       unsigned changed_flags) {
+                                       content::InvalidateTypes changed_flags) {
   // Only need to update the title if the title changed while not loading,
   // because the title is also updated when loading state changes.
   if ((changed_flags & content::INVALIDATE_TYPE_TAB) ||