| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/apps/chrome_app_delegate.h" | 5 #include "chrome/browser/ui/apps/chrome_app_delegate.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 DCHECK(web_contents); | 209 DCHECK(web_contents); |
| 210 content::HostZoomMap* zoom_map = | 210 content::HostZoomMap* zoom_map = |
| 211 content::HostZoomMap::GetForWebContents(web_contents); | 211 content::HostZoomMap::GetForWebContents(web_contents); |
| 212 DCHECK(zoom_map); | 212 DCHECK(zoom_map); |
| 213 zoom_map->SetZoomLevelForHost(web_contents->GetURL().host(), 0); | 213 zoom_map->SetZoomLevelForHost(web_contents->GetURL().host(), 0); |
| 214 } | 214 } |
| 215 } | 215 } |
| 216 | 216 |
| 217 void ChromeAppDelegate::ResizeWebContents(content::WebContents* web_contents, | 217 void ChromeAppDelegate::ResizeWebContents(content::WebContents* web_contents, |
| 218 const gfx::Size& size) { | 218 const gfx::Size& size) { |
| 219 ::ResizeWebContents(web_contents, size); | 219 ::ResizeWebContents(web_contents, gfx::Rect(size)); |
| 220 } | 220 } |
| 221 | 221 |
| 222 content::WebContents* ChromeAppDelegate::OpenURLFromTab( | 222 content::WebContents* ChromeAppDelegate::OpenURLFromTab( |
| 223 content::BrowserContext* context, | 223 content::BrowserContext* context, |
| 224 content::WebContents* source, | 224 content::WebContents* source, |
| 225 const content::OpenURLParams& params) { | 225 const content::OpenURLParams& params) { |
| 226 return OpenURLFromTabInternal(context, params); | 226 return OpenURLFromTabInternal(context, params); |
| 227 } | 227 } |
| 228 | 228 |
| 229 void ChromeAppDelegate::AddNewContents(content::BrowserContext* context, | 229 void ChromeAppDelegate::AddNewContents(content::BrowserContext* context, |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 KeepAliveRestartOption::DISABLED)); | 339 KeepAliveRestartOption::DISABLED)); |
| 340 } | 340 } |
| 341 | 341 |
| 342 void ChromeAppDelegate::Observe(int type, | 342 void ChromeAppDelegate::Observe(int type, |
| 343 const content::NotificationSource& source, | 343 const content::NotificationSource& source, |
| 344 const content::NotificationDetails& details) { | 344 const content::NotificationDetails& details) { |
| 345 DCHECK_EQ(chrome::NOTIFICATION_APP_TERMINATING, type); | 345 DCHECK_EQ(chrome::NOTIFICATION_APP_TERMINATING, type); |
| 346 if (!terminating_callback_.is_null()) | 346 if (!terminating_callback_.is_null()) |
| 347 terminating_callback_.Run(); | 347 terminating_callback_.Run(); |
| 348 } | 348 } |
| OLD | NEW |