| 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 #if defined(ENABLE_PRINT_PREVIEW) | 186 #if defined(ENABLE_PRINT_PREVIEW) |
| 187 printing::PrintViewManager::CreateForWebContents(web_contents); | 187 printing::PrintViewManager::CreateForWebContents(web_contents); |
| 188 printing::PrintPreviewMessageHandler::CreateForWebContents(web_contents); | 188 printing::PrintPreviewMessageHandler::CreateForWebContents(web_contents); |
| 189 #else | 189 #else |
| 190 printing::PrintViewManagerBasic::CreateForWebContents(web_contents); | 190 printing::PrintViewManagerBasic::CreateForWebContents(web_contents); |
| 191 #endif // defined(ENABLE_PRINT_PREVIEW) | 191 #endif // defined(ENABLE_PRINT_PREVIEW) |
| 192 #endif // defined(ENABLE_PRINTING) | 192 #endif // defined(ENABLE_PRINTING) |
| 193 extensions::ChromeExtensionWebContentsObserver::CreateForWebContents( | 193 extensions::ChromeExtensionWebContentsObserver::CreateForWebContents( |
| 194 web_contents); | 194 web_contents); |
| 195 | 195 |
| 196 // Kiosk app supports zooming. | 196 zoom::ZoomController::CreateForWebContents(web_contents); |
| 197 if (chrome::IsRunningInForcedAppMode()) | |
| 198 zoom::ZoomController::CreateForWebContents(web_contents); | |
| 199 } | 197 } |
| 200 | 198 |
| 201 void ChromeAppDelegate::RenderViewCreated( | 199 void ChromeAppDelegate::RenderViewCreated( |
| 202 content::RenderViewHost* render_view_host) { | 200 content::RenderViewHost* render_view_host) { |
| 203 if (!chrome::IsRunningInForcedAppMode()) { | 201 if (!chrome::IsRunningInForcedAppMode()) { |
| 204 // Due to a bug in the way apps reacted to default zoom changes, some apps | 202 // Due to a bug in the way apps reacted to default zoom changes, some apps |
| 205 // can incorrectly have host level zoom settings. These aren't wanted as | 203 // can incorrectly have host level zoom settings. These aren't wanted as |
| 206 // apps cannot be zoomed, so are removed. This should be removed if apps | 204 // apps cannot be zoomed, so are removed. This should be removed if apps |
| 207 // can be made to zoom again. | 205 // can be made to zoom again. |
| 208 // See http://crbug.com/446759 for more details. | 206 // See http://crbug.com/446759 for more details. |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 KeepAliveRestartOption::DISABLED)); | 339 KeepAliveRestartOption::DISABLED)); |
| 342 } | 340 } |
| 343 | 341 |
| 344 void ChromeAppDelegate::Observe(int type, | 342 void ChromeAppDelegate::Observe(int type, |
| 345 const content::NotificationSource& source, | 343 const content::NotificationSource& source, |
| 346 const content::NotificationDetails& details) { | 344 const content::NotificationDetails& details) { |
| 347 DCHECK_EQ(chrome::NOTIFICATION_APP_TERMINATING, type); | 345 DCHECK_EQ(chrome::NOTIFICATION_APP_TERMINATING, type); |
| 348 if (!terminating_callback_.is_null()) | 346 if (!terminating_callback_.is_null()) |
| 349 terminating_callback_.Run(); | 347 terminating_callback_.Run(); |
| 350 } | 348 } |
| OLD | NEW |