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

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

Issue 570473002: kiosk: Fix zoom crash regression. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add a DCHECK Created 6 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/apps/chrome_native_app_window_views.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "chrome/browser/app_mode/app_mode_utils.h"
9 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" 11 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h"
11 #include "chrome/browser/favicon/favicon_tab_helper.h" 12 #include "chrome/browser/favicon/favicon_tab_helper.h"
12 #include "chrome/browser/file_select_helper.h" 13 #include "chrome/browser/file_select_helper.h"
13 #include "chrome/browser/media/media_capture_devices_dispatcher.h" 14 #include "chrome/browser/media/media_capture_devices_dispatcher.h"
14 #include "chrome/browser/platform_util.h" 15 #include "chrome/browser/platform_util.h"
15 #include "chrome/browser/profiles/profile.h" 16 #include "chrome/browser/profiles/profile.h"
16 #include "chrome/browser/shell_integration.h" 17 #include "chrome/browser/shell_integration.h"
17 #include "chrome/browser/ui/browser.h" 18 #include "chrome/browser/ui/browser.h"
18 #include "chrome/browser/ui/browser_dialogs.h" 19 #include "chrome/browser/ui/browser_dialogs.h"
19 #include "chrome/browser/ui/browser_tabstrip.h" 20 #include "chrome/browser/ui/browser_tabstrip.h"
20 #include "chrome/browser/ui/browser_window.h" 21 #include "chrome/browser/ui/browser_window.h"
21 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" 22 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h"
22 #include "chrome/browser/ui/web_contents_sizer.h" 23 #include "chrome/browser/ui/web_contents_sizer.h"
24 #include "chrome/browser/ui/zoom/zoom_controller.h"
23 #include "chrome/common/extensions/chrome_extension_messages.h" 25 #include "chrome/common/extensions/chrome_extension_messages.h"
24 #include "content/public/browser/browser_context.h" 26 #include "content/public/browser/browser_context.h"
25 #include "content/public/browser/notification_service.h" 27 #include "content/public/browser/notification_service.h"
26 #include "content/public/browser/render_view_host.h" 28 #include "content/public/browser/render_view_host.h"
27 #include "content/public/browser/web_contents.h" 29 #include "content/public/browser/web_contents.h"
28 #include "content/public/browser/web_contents_delegate.h" 30 #include "content/public/browser/web_contents_delegate.h"
29 #include "extensions/common/constants.h" 31 #include "extensions/common/constants.h"
30 #include "extensions/grit/extensions_browser_resources.h" 32 #include "extensions/grit/extensions_browser_resources.h"
31 #include "ui/base/resource/resource_bundle.h" 33 #include "ui/base/resource/resource_bundle.h"
32 34
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 #if defined(ENABLE_PRINTING) 170 #if defined(ENABLE_PRINTING)
169 #if defined(ENABLE_FULL_PRINTING) 171 #if defined(ENABLE_FULL_PRINTING)
170 printing::PrintViewManager::CreateForWebContents(web_contents); 172 printing::PrintViewManager::CreateForWebContents(web_contents);
171 printing::PrintPreviewMessageHandler::CreateForWebContents(web_contents); 173 printing::PrintPreviewMessageHandler::CreateForWebContents(web_contents);
172 #else 174 #else
173 printing::PrintViewManagerBasic::CreateForWebContents(web_contents); 175 printing::PrintViewManagerBasic::CreateForWebContents(web_contents);
174 #endif // defined(ENABLE_FULL_PRINTING) 176 #endif // defined(ENABLE_FULL_PRINTING)
175 #endif // defined(ENABLE_PRINTING) 177 #endif // defined(ENABLE_PRINTING)
176 extensions::ChromeExtensionWebContentsObserver::CreateForWebContents( 178 extensions::ChromeExtensionWebContentsObserver::CreateForWebContents(
177 web_contents); 179 web_contents);
180
181 // Kiosk app supports zooming.
182 if (chrome::IsRunningInForcedAppMode())
183 ZoomController::CreateForWebContents(web_contents);
178 } 184 }
179 185
180 void ChromeAppDelegate::ResizeWebContents(content::WebContents* web_contents, 186 void ChromeAppDelegate::ResizeWebContents(content::WebContents* web_contents,
181 const gfx::Size& size) { 187 const gfx::Size& size) {
182 ::ResizeWebContents(web_contents, size); 188 ::ResizeWebContents(web_contents, size);
183 } 189 }
184 190
185 content::WebContents* ChromeAppDelegate::OpenURLFromTab( 191 content::WebContents* ChromeAppDelegate::OpenURLFromTab(
186 content::BrowserContext* context, 192 content::BrowserContext* context,
187 content::WebContents* source, 193 content::WebContents* source,
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 const content::NotificationDetails& details) { 283 const content::NotificationDetails& details) {
278 switch (type) { 284 switch (type) {
279 case chrome::NOTIFICATION_APP_TERMINATING: 285 case chrome::NOTIFICATION_APP_TERMINATING:
280 if (!terminating_callback_.is_null()) 286 if (!terminating_callback_.is_null())
281 terminating_callback_.Run(); 287 terminating_callback_.Run();
282 break; 288 break;
283 default: 289 default:
284 NOTREACHED() << "Received unexpected notification"; 290 NOTREACHED() << "Received unexpected notification";
285 } 291 }
286 } 292 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/apps/chrome_native_app_window_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698