Volvo has agreed a $300 million alliance with Uber to develop self-driving cars.