In Anthony Trollope's The Way We Live Now, there are several places where "ain't" is used instead of "am not", such as:
"I ain't afraid of him, if you mean that," continued Lord Nidderdale.
— Anthony Trollope, The Way We Live Now (Kindle Locations 3161-3162).
"But then she don't want me, and I ain't quite sure that I want her."
— Anthony Trollope, The Way We Live Now (Kindle Locations 3165-3166).
Besides Lord Nidderdale, who belongs to the aristocracy, elsewhere in the book it is the village girl Ruby and other village residents who use "ain't" in the sense of "is not", "are not" and "am not".
Is the fact that today "ain't" is regarded as slang a development post-Trollope (who was writing not so long ago), or is His Lordship merely being colloquial? Was Trollope actually a catalyst in this change?