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

Side by Side Diff: chrome/browser/ui/apps/chrome_app_delegate.cc

Issue 2204393002: [Extensions] Remove ExtensionFunction usage of RenderViewHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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 unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc ('k') | extensions/browser/extension_function.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698