Bug 1409972 - Part 5. Use the common printingui implementation. r?mshal draft
authorMantaroh Yoshinaga <mantaroh@gmail.com>
Fri, 10 Nov 2017 11:03:43 +0900
changeset 695957 c53ae014cbd20f83332891c9f80b7b1da9bb8d55
parent 695956 617649c5a48309ff213c80bc74318276f18acadc
child 695958 d6e63e110b3f36fd11022d96479b604cec5cf5fc
push id88595
push usermantaroh@gmail.com
push dateFri, 10 Nov 2017 02:11:26 +0000
reviewersmshal
bugs1409972
milestone58.0a1
Bug 1409972 - Part 5. Use the common printingui implementation. r?mshal This patch will change moz.build of printingui and xre to use common printingui implementation. Memo of merging printingui: * The nsProgress / nsProgressParam is used by Windows and GTK, macOS doesn't have this implementation. * The merged implementation located toolkit/components/printingui/ directory. MozReview-Commit-ID: 3Z5MAzGVo1b
toolkit/components/printingui/moz.build
toolkit/xre/moz.build
--- a/toolkit/components/printingui/moz.build
+++ b/toolkit/components/printingui/moz.build
@@ -2,19 +2,21 @@
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 with Files('**'):
     BUG_COMPONENT = ('Toolkit', 'Printing')
 
-toolkit = CONFIG['MOZ_WIDGET_TOOLKIT']
-
 DIRS += ['ipc']
 
 if CONFIG['NS_PRINTING']:
-    if toolkit == 'windows':
-        DIRS += ['win']
-    elif toolkit == 'cocoa':
-        DIRS += ['mac']
-    elif CONFIG['MOZ_PDF_PRINTING']:
-        DIRS += ['unixshared']
+    UNIFIED_SOURCES += [
+        'nsPrintingPromptService.cpp',
+    ]
+    if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows' or CONFIG['MOZ_PDF_PRINTING']:
+        UNIFIED_SOURCES += [
+            'nsPrintProgress.cpp',
+            'nsPrintProgressParams.cpp',
+        ]
+
+FINAL_LIBRARY = 'xul'
--- a/toolkit/xre/moz.build
+++ b/toolkit/xre/moz.build
@@ -40,30 +40,30 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind
         '../../other-licenses/nsis/Contrib/CityHash/cityhash/city.cpp',
     ]
     UNIFIED_SOURCES += [
         'nsNativeAppSupportWin.cpp',
     ]
     DEFINES['PROXY_PRINTING'] = 1
     LOCAL_INCLUDES += [
         '../../other-licenses/nsis/Contrib/CityHash/cityhash',
-        '../components/printingui/win',
+        '../components/printingui',
     ]
 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     UNIFIED_SOURCES += [
         'MacApplicationDelegate.mm',
         'MacAutoreleasePool.mm',
         'MacLaunchHelper.mm',
         'nsCommandLineServiceMac.cpp',
         'nsNativeAppSupportCocoa.mm',
         'updaterfileutils_osx.mm',
     ]
     DEFINES['PROXY_PRINTING'] = 1
     LOCAL_INCLUDES += [
-        '../components/printingui/mac',
+        '../components/printingui',
     ]
 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'uikit':
     UNIFIED_SOURCES += [
         'nsNativeAppSupportDefault.cpp',
         'UIKitDirProvider.mm',
     ]
 elif 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
     UNIFIED_SOURCES += [
@@ -125,17 +125,17 @@ if CONFIG['MOZ_UPDATER']:
     if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
         UNIFIED_SOURCES += [
             'nsUpdateDriver.cpp',
         ]
 
 if CONFIG['MOZ_PDF_PRINTING']:
     DEFINES['PROXY_PRINTING'] = 1
     LOCAL_INCLUDES += [
-        '../components/printingui/unixshared',
+        '../components/printingui',
     ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
 if CONFIG['MOZ_GL_DEFAULT_PROVIDER'] == 'GLX':
     DEFINES['USE_GLX_TEST'] = True