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

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

Issue 769593003: Move ZoomObserver, ZoomController and ZoomEventManager to components/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove obsolete defines in build files. Created 6 years 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 "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/app_mode/app_mode_utils.h"
10 #include "chrome/browser/apps/scoped_keep_alive.h" 10 #include "chrome/browser/apps/scoped_keep_alive.h"
11 #include "chrome/browser/chrome_notification_types.h" 11 #include "chrome/browser/chrome_notification_types.h"
12 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" 12 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h"
13 #include "chrome/browser/favicon/favicon_tab_helper.h" 13 #include "chrome/browser/favicon/favicon_tab_helper.h"
14 #include "chrome/browser/file_select_helper.h" 14 #include "chrome/browser/file_select_helper.h"
15 #include "chrome/browser/media/media_capture_devices_dispatcher.h" 15 #include "chrome/browser/media/media_capture_devices_dispatcher.h"
16 #include "chrome/browser/platform_util.h" 16 #include "chrome/browser/platform_util.h"
17 #include "chrome/browser/profiles/profile.h" 17 #include "chrome/browser/profiles/profile.h"
18 #include "chrome/browser/shell_integration.h" 18 #include "chrome/browser/shell_integration.h"
19 #include "chrome/browser/ui/browser.h" 19 #include "chrome/browser/ui/browser.h"
20 #include "chrome/browser/ui/browser_dialogs.h" 20 #include "chrome/browser/ui/browser_dialogs.h"
21 #include "chrome/browser/ui/browser_tabstrip.h" 21 #include "chrome/browser/ui/browser_tabstrip.h"
22 #include "chrome/browser/ui/browser_window.h" 22 #include "chrome/browser/ui/browser_window.h"
23 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" 23 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h"
24 #include "chrome/browser/ui/web_contents_sizer.h" 24 #include "chrome/browser/ui/web_contents_sizer.h"
25 #include "chrome/browser/ui/zoom/zoom_controller.h"
26 #include "chrome/common/extensions/chrome_extension_messages.h" 25 #include "chrome/common/extensions/chrome_extension_messages.h"
26 #include "components/ui/zoom/zoom_controller.h"
27 #include "content/public/browser/browser_context.h" 27 #include "content/public/browser/browser_context.h"
28 #include "content/public/browser/notification_service.h" 28 #include "content/public/browser/notification_service.h"
29 #include "content/public/browser/render_view_host.h" 29 #include "content/public/browser/render_view_host.h"
30 #include "content/public/browser/web_contents.h" 30 #include "content/public/browser/web_contents.h"
31 #include "content/public/browser/web_contents_delegate.h" 31 #include "content/public/browser/web_contents_delegate.h"
32 #include "extensions/common/constants.h" 32 #include "extensions/common/constants.h"
33 33
34 #if defined(USE_ASH) 34 #if defined(USE_ASH)
35 #include "ash/shelf/shelf_constants.h" 35 #include "ash/shelf/shelf_constants.h"
36 #endif 36 #endif
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 printing::PrintPreviewMessageHandler::CreateForWebContents(web_contents); 175 printing::PrintPreviewMessageHandler::CreateForWebContents(web_contents);
176 #else 176 #else
177 printing::PrintViewManagerBasic::CreateForWebContents(web_contents); 177 printing::PrintViewManagerBasic::CreateForWebContents(web_contents);
178 #endif // defined(ENABLE_PRINT_PREVIEW) 178 #endif // defined(ENABLE_PRINT_PREVIEW)
179 #endif // defined(ENABLE_PRINTING) 179 #endif // defined(ENABLE_PRINTING)
180 extensions::ChromeExtensionWebContentsObserver::CreateForWebContents( 180 extensions::ChromeExtensionWebContentsObserver::CreateForWebContents(
181 web_contents); 181 web_contents);
182 182
183 // Kiosk app supports zooming. 183 // Kiosk app supports zooming.
184 if (chrome::IsRunningInForcedAppMode()) 184 if (chrome::IsRunningInForcedAppMode())
185 ZoomController::CreateForWebContents(web_contents); 185 ui_zoom::ZoomController::CreateForWebContents(web_contents);
186 } 186 }
187 187
188 void ChromeAppDelegate::ResizeWebContents(content::WebContents* web_contents, 188 void ChromeAppDelegate::ResizeWebContents(content::WebContents* web_contents,
189 const gfx::Size& size) { 189 const gfx::Size& size) {
190 ::ResizeWebContents(web_contents, size); 190 ::ResizeWebContents(web_contents, size);
191 } 191 }
192 192
193 content::WebContents* ChromeAppDelegate::OpenURLFromTab( 193 content::WebContents* ChromeAppDelegate::OpenURLFromTab(
194 content::BrowserContext* context, 194 content::BrowserContext* context,
195 content::WebContents* source, 195 content::WebContents* source,
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 const content::NotificationDetails& details) { 290 const content::NotificationDetails& details) {
291 switch (type) { 291 switch (type) {
292 case chrome::NOTIFICATION_APP_TERMINATING: 292 case chrome::NOTIFICATION_APP_TERMINATING:
293 if (!terminating_callback_.is_null()) 293 if (!terminating_callback_.is_null())
294 terminating_callback_.Run(); 294 terminating_callback_.Run();
295 break; 295 break;
296 default: 296 default:
297 NOTREACHED() << "Received unexpected notification"; 297 NOTREACHED() << "Received unexpected notification";
298 } 298 }
299 } 299 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_preferences_util.cc ('k') | chrome/browser/ui/autofill/chrome_autofill_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698