Why is corporation tax regarded as a direct tax? I understand that the classification of taxes is on ability-to-pay principle and is partly determined by the demand elasticity of the commodity or service.

That's how I understand income tax is direct, while customs tax is indirect. 

But I can't really wrap my head around why corporation tax is also considered a direct tax. Can't the corporations simply raise their prices in order to shift away the incidence of tax burden?
The classification of direct vs indirect taxes is outdated and has nothing to do with the effects of taxes on behaviour. This classification is mostly due to historic reasons.

Direct taxes are taxes on property, businesses or people. They tax entities directly and not through their behavior. This doesn't mean, however, that these taxes don't have behavioral effects. 

Indirect taxes are taxes on transactions and exchanges, since they are not taxing entities themselves, but their behaviour. 

The classification is not very meaningful nowadays. For example the estate tax is direct (it directly taxes the estate), whereas the inheritance tax is indirect  (it taxes the transaction from parent to child). However, these two taxes are economically equivalent.