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

Side by Side Diff: chrome/browser/ui/webui/print_preview/print_preview_handler.cc

Issue 1336823003: Move chrome::HostDesktopType to ui::HostDesktopType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@base_session_service_delegate_impl
Patch Set: Fix build on Mac and CrOS Created 5 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/webui/print_preview/print_preview_handler.h" 5 #include "chrome/browser/ui/webui/print_preview/print_preview_handler.h"
6 6
7 #include <ctype.h> 7 #include <ctype.h>
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 1255 matching lines...) Expand 10 before | Expand all | Expand 10 after
1266 1266
1267 base::CommandLine* cmdline = base::CommandLine::ForCurrentProcess(); 1267 base::CommandLine* cmdline = base::CommandLine::ForCurrentProcess();
1268 initial_settings.SetBoolean(kPrintAutomaticallyInKioskMode, 1268 initial_settings.SetBoolean(kPrintAutomaticallyInKioskMode,
1269 cmdline->HasSwitch(switches::kKioskModePrinting)); 1269 cmdline->HasSwitch(switches::kKioskModePrinting));
1270 initial_settings.SetBoolean(kAppKioskMode, 1270 initial_settings.SetBoolean(kAppKioskMode,
1271 chrome::IsRunningInForcedAppMode()); 1271 chrome::IsRunningInForcedAppMode());
1272 #if defined(OS_WIN) 1272 #if defined(OS_WIN)
1273 // In Win8 metro, the system print dialog can only open on the desktop. Doing 1273 // In Win8 metro, the system print dialog can only open on the desktop. Doing
1274 // so will cause the browser to appear hung, so we don't show the link in 1274 // so will cause the browser to appear hung, so we don't show the link in
1275 // metro. 1275 // metro.
1276 bool is_ash = (chrome::GetActiveDesktop() == chrome::HOST_DESKTOP_TYPE_ASH); 1276 bool is_ash = (chrome::GetActiveDesktop() == ui::HOST_DESKTOP_TYPE_ASH);
1277 initial_settings.SetBoolean(kHidePrintWithSystemDialogLink, is_ash); 1277 initial_settings.SetBoolean(kHidePrintWithSystemDialogLink, is_ash);
1278 #endif 1278 #endif
1279 1279
1280 if (print_preview_ui()->source_is_modifiable()) 1280 if (print_preview_ui()->source_is_modifiable())
1281 GetNumberFormatAndMeasurementSystem(&initial_settings); 1281 GetNumberFormatAndMeasurementSystem(&initial_settings);
1282 web_ui()->CallJavascriptFunction("setInitialSettings", initial_settings); 1282 web_ui()->CallJavascriptFunction("setInitialSettings", initial_settings);
1283 1283
1284 WebContents* initiator = GetInitiator(); 1284 WebContents* initiator = GetInitiator();
1285 if (initiator && cmdline->HasSwitch(switches::kEnableDomDistiller) && 1285 if (initiator && cmdline->HasSwitch(switches::kEnableDomDistiller) &&
1286 dom_distiller::url_utils::IsUrlDistillable( 1286 dom_distiller::url_utils::IsUrlDistillable(
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
1806 1806
1807 void PrintPreviewHandler::UnregisterForGaiaCookieChanges() { 1807 void PrintPreviewHandler::UnregisterForGaiaCookieChanges() {
1808 if (gaia_cookie_manager_service_) 1808 if (gaia_cookie_manager_service_)
1809 gaia_cookie_manager_service_->RemoveObserver(this); 1809 gaia_cookie_manager_service_->RemoveObserver(this);
1810 } 1810 }
1811 1811
1812 void PrintPreviewHandler::SetPdfSavedClosureForTesting( 1812 void PrintPreviewHandler::SetPdfSavedClosureForTesting(
1813 const base::Closure& closure) { 1813 const base::Closure& closure) {
1814 pdf_file_saved_closure_ = closure; 1814 pdf_file_saved_closure_ = closure;
1815 } 1815 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698