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

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

Issue 702603004: Renamed DISABLE_BASIC_PRINTING and ENABLE_FULL_PRINTING. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Wed Nov 5 02:31:54 PST 2014 Created 6 years, 1 month 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"
(...skipping 18 matching lines...) Expand all
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
37 37
38 #if defined(ENABLE_PRINTING) 38 #if defined(ENABLE_PRINTING)
39 #if defined(ENABLE_FULL_PRINTING) 39 #if defined(ENABLE_PRINT_PREVIEW)
40 #include "chrome/browser/printing/print_preview_message_handler.h" 40 #include "chrome/browser/printing/print_preview_message_handler.h"
41 #include "chrome/browser/printing/print_view_manager.h" 41 #include "chrome/browser/printing/print_view_manager.h"
42 #else 42 #else
43 #include "chrome/browser/printing/print_view_manager_basic.h" 43 #include "chrome/browser/printing/print_view_manager_basic.h"
44 #endif // defined(ENABLE_FULL_PRINTING) 44 #endif // defined(ENABLE_PRINT_PREVIEW)
45 #endif // defined(ENABLE_PRINTING) 45 #endif // defined(ENABLE_PRINTING)
46 46
47 namespace { 47 namespace {
48 48
49 bool disable_external_open_for_testing_ = false; 49 bool disable_external_open_for_testing_ = false;
50 50
51 // Opens a URL with Chromium (not external browser) with the right profile. 51 // Opens a URL with Chromium (not external browser) with the right profile.
52 content::WebContents* OpenURLFromTabInternal( 52 content::WebContents* OpenURLFromTabInternal(
53 content::BrowserContext* context, 53 content::BrowserContext* context,
54 const content::OpenURLParams& params) { 54 const content::OpenURLParams& params) {
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 } 163 }
164 164
165 void ChromeAppDelegate::DisableExternalOpenForTesting() { 165 void ChromeAppDelegate::DisableExternalOpenForTesting() {
166 disable_external_open_for_testing_ = true; 166 disable_external_open_for_testing_ = true;
167 } 167 }
168 168
169 void ChromeAppDelegate::InitWebContents(content::WebContents* web_contents) { 169 void ChromeAppDelegate::InitWebContents(content::WebContents* web_contents) {
170 FaviconTabHelper::CreateForWebContents(web_contents); 170 FaviconTabHelper::CreateForWebContents(web_contents);
171 171
172 #if defined(ENABLE_PRINTING) 172 #if defined(ENABLE_PRINTING)
173 #if defined(ENABLE_FULL_PRINTING) 173 #if defined(ENABLE_PRINT_PREVIEW)
174 printing::PrintViewManager::CreateForWebContents(web_contents); 174 printing::PrintViewManager::CreateForWebContents(web_contents);
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_FULL_PRINTING) 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 ZoomController::CreateForWebContents(web_contents);
186 } 186 }
187 187
188 void ChromeAppDelegate::ResizeWebContents(content::WebContents* web_contents, 188 void ChromeAppDelegate::ResizeWebContents(content::WebContents* web_contents,
(...skipping 101 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

Powered by Google App Engine
This is Rietveld 408576698