Stay Updated on Developing Stories

What will go through John Roberts' head as he swears in Donald Trump?

Washington(CNN) As Donald Trump puts his hand on the bible Friday and swears to "faithfully execute the Office of President" few people will focus on the man in the judicial robe delivering the oath.

But, oh, to have a thought bubble over Chief Justice John Roberts' head.

Roberts will swear in a President-elect who has called the chief justice a "nightmare for conservatives" and lambasted his voting record. At the same time, a Trump presidency guarantees something critical to Roberts' own legacy: a conservative majority.

Those thoughts might be swirling around in the chief's head as he stands across from President-elect Donald Trump and focuses on the words he needs to recite.

"There have certainly been more awkward confrontations between a chief justice and the President he was swearing in," said Steve Vladeck, CNN Supreme Court analyst and professor of law at the University of Texas School of Law. "But I'm sure there will be a lot going through the chief justice's mind Friday -- about his legacy, the role of the Supreme Court during President Trump's tenure, and, frankly, the specific function he'll be performing on stage."

Regardless, Friday's swearing-in won't be as contentious as when John Marshall swore in his cousin and political enemy Thomas Jefferson, or even when Roberts swore in Barack Obama, who, as a senator, voted against his confirmation to the Supreme Court, Vladeck noted.

Administered oath four times to Obama

By now, Roberts is an old pro at delivering the oath. But that wasn't always the case. In fact, he's now administered the presidential oath four times -- all to one man.

Back in 2009, Roberts garbled the words during Obama's first inauguration. Cameras captured two confused constitutional scholars reciting the words out of sequence.

The next day, they met again in the White House for a do-over. Just to be safe.

Flash forward to 2013. The justices once again gathered on the dais for Obama's second inauguration on January 21. On that day, Michele Obama's acute fashion style was eclipsed by the elegant hat worn by Justice Antonin Scalia. It was a custom made replica of the hat depicted in Hans Holbein's famous portrait of St. Thomas More. The twitterverse weighed in calling it #Scaliaweirdhat.

This time the oath -- with Roberts reading from a card -- went seamlessly. But in fact the two had met the day before to perform the oath at the White House because the Constitution requires it to be performed on January 20 -- which fell on a Sunday in 2013.

Roberts' Obamacare vote

By then, a much grayer Obama had a history with Roberts. The chief had cast the deciding vote in June 2012 to save the President's signature legislative achievement: Obamacare. Critics of the law had challenged it all the way to the Supreme Court, arguing that it violated the commerce clause of the Constitution.

In a cliffhanger, Roberts wrote an opinion agreeing that the law violated the Commerce Clause but famously sided with the court's four liberals to uphold it under a secondary argument put forward by the government: that it was in essence a tax.

That vote saved the day for Obama and infuriated Roberts' critics -- a grudge held by the GOP base, Trump and other Republican presidential contenders like Ted Cruz -- despite his key conservative votes on on issues concerning gay marriage, affirmative action, campaign finance, abortion and voting rights.

"John Roberts turned out to be an absolute disaster, he turned out to be an absolute disaster because he gave us Obamacare," Trump said last January on ABC.

Roberts made clear in his opinion that he was no fan of the Affordable Care Act, however.

"Members of this Court are vested with the authority to interpret the law; we possess neither the expertise nor the prerogative to make policy judgments. Those decisions are entrusted to our Nation's elected leaders, who can be thrown out of office if the people disagree with them," he wrote. "It is not our job to protect the people from the consequences of their political choices."

By 2015 the law was before the justices again in a different challenge and, once again, Roberts voted in its favor.

There's an irony to the vote.

On Friday, Roberts will swear in a man who now is working actively to repeal the law that Roberts saved.

That means that the hundreds of hours and thousands of legal briefs -- filed by state governments, conservative groups and others behind the challenges -- no longer really matter in a political sense.

Will the replacement law be challenged as well before the Supreme Court?

Replacing Scalia

The political world was jolted in the middle of the campaign when Justice Antonin Scalia suddenly died.

All at once, Roberts found himself having to mourn the sudden death of a beloved colleague, plan the courts' intricate memorial service, and deal with the complications of an eight-member court.

Ironically, it was the political branches who were suddenly thrust into a constitutional debate regarding whether Senate Republicans were compelled to hold hearings for Obama's pick: Merrick Garland.

Meanwhile, with Hillary Clinton leading in the polls, progressives found themselves on the precipice of something brand new -- and not seen since the 1960s: a liberal majority. They began to dream big.

For the most part the Supreme Court justices kept their heads down, tried to get their work done and avoid 4-4 splits.

And then, whiplash again, Trump won the White House.

By the time of the swearing in is over, Trump may look at Roberts though a different lens. He might someday need his vote.

And one of Trump's first acts as President will be to name Scalia's replacement.

That man or woman will cement the conservative majority. On top of that, Trump may also get the chance to replace a second justice because three current members are in their late 70's and early 80's.

That person could mean that the Court will remain right leaning throughout Roberts' tenure.

"It's a common assumption that the most important vote on the Supreme Court is that of Justice Kennedy," said Vladeck, referring to the Justice whose vote often provides either the more progressive or conservative bloc with a majority. "But especially if President Trump is able to put more than one justice on the Court, the real swing vote could become Chief Justice Roberts -- likely the first time a chief justice has been such an important vote in individual cases since the 1930s.

"By the end of a Trump presidency, this really could be the Roberts Court not just in name."

Outbrain