The US Navy agrees to limit its use of sonar that may inadvertently harm whales and dolphins in waters near Hawaii and California.