Season the chicken thighs and drumsticks with salt and pepper.
In a large Dutch oven or heavy pot, heat the olive oil over medium-high heat.
Add the chicken, skin side down, and sear for 5-6 minutes on each side until golden brown. Remove the chicken and set aside.
In the same pot, add the diced bacon or pancetta and cook until crispy, about 4-5 minutes.
Stir in the garlic and cook for another minute.
Sprinkle the flour over the bacon and onions, stirring to coat everything.
Pour in the red wine and scrape up any browned bits from the bottom of the pot.
Add the chicken broth, tomato paste, thyme, and bay leaves. Stir well to combine.
Return the chicken to the pot, nestling it into the liquid.
Bring the pot to a simmer, then cover and reduce the heat to low. Let it simmer gently for 25-30 minutes until the chicken is tender and cooked through.
In a separate pan, melt the butter over medium heat.
Add the quartered mushrooms and pearl onions (if using) and sauté until golden, about 5-7 minutes.
Stir the mushrooms and onions into the pot with the chicken, and cook for another 10 minutes.
Remove the thyme sprigs and bay leaves.
Taste and adjust the seasoning with salt and pepper.
Garnish with chopped fresh parsley and serve warm.