Heat oil in a skillet over medium heat and cook and stir onion until soft and translucent, 4 to 6 minutes. Add chicken hearts and brown, stirring constantly, about 3 minutes. Cover skillet, reduce heat, and cook until hearts are no longer pink in the center, about 10 minutes. Add mushrooms and mix well. Cook, covered, for an additional 5 minutes. Season with salt and pepper.