The first policy priority President-elect Donald Trump mentioned in his victory speech Wednesday morning was a large infrastructure spending program, a major goal for Democrats in Washington.

The first policy priority President-elect Donald Trump mentioned in his victory speech Wednesday morning was a large infrastructure spending program, a major goal for Democrats in Washington.

Trump graciously praised Hillary Clinton. He did the same with President Barack Obama, whom he met with at the White House on Thursday. Obama and Trump did an eerily realistic impression of two people who had just had an enjoyable and productive meeting, one that ran much longer than it was scheduled to.

Somebody is talking to Bloomberg News about the productive relationship likely to exist between Trump and Sen. Chuck Schumer, the likely Democratic minority leader in the Senate.

What's going on here?

I think Trump's surprisingly cordial overtures to Democrats are best understood as a shot across the bow of Paul Ryan and Mitch McConnell, and as groundwork he is laying to be able to work with either side of the aisle in Congress as necessary.

Donald Trump's television politics

To understand what I see Trump being up to, you should look at the way he handled Fox News Channel and CNN in the early days of his campaign.*

When Trump announced his run for president, he and Fox News seemed as though they would be a match made in heaven. Trump is conservative TV news ratings gold, and he'd been a regular personality on the network, calling in frequently to "Fox and Friends" for years.

But not everybody at Fox News is as soft a touch as Sean Hannity, and Trump likely surmised that a lot of people there wouldn't want him to actually be the Republican nominee — lest he lose, or win and do unconservative things. And he had very good reason to fear he would face tough questioning and coverage from newsier personalities at the network, such as Megyn Kelly and Chris Wallace.

Trump needed a strategy to keep Fox in line. So after the first Republican primary debate, which Kelly opened by asking about his past insulting comments about women, Trump used Twitter to eagerly attack the network, and refused to be interviewed on the network for a time.

But to be able to credibly threaten to disfavor Fox and deny it a ratings magnet, he needed somewhere else to go on television. That was what CNN was for.

Trump started cultivating CNN even before the first Fox debate. Gabriel Sherman reported for New York magazine in August 2015 that the Trump campaign had been handing important exclusives to CNN, including one that had been promised to Fox News.

Sherman reported that the choice to favor CNN was a source of consternation within the campaign, but it obviously paid dividends later when Trump needed to pressure Fox News to back off its harsh coverage.

The art of the deal

As Trump prepares to govern, you can think of Ryan and McConnell as like Fox News, and Schumer and his Democrats as like CNN.

Trump could pursue a strategy of snubbing Democrats and signing a legislative agenda that Republicans pass on party-line votes. This strategy would also require him to depend on party-line Republican support for his cabinet appointments.

But a strategy of writing off the Democrats would give Ryan and McConnell a great deal of agenda-setting power, not to mention the power it would give to rank-and-file Republican members of the Senate, who could deny Trump a majority if just three break ranks on any matter, because of Republicans' narrow majority.

If Trump wants to be able to defy Ryan and McConnell and set his own agenda — either because he is serious about the less conservative parts of his campaign platform or he simply hates ceding power to others — he needs someone else he can work with on Capitol Hill. That will require developing a working relationship with Democrats.

I am not coming anywhere close to saying Trump is a closet Democrat eager to work with Schumer to implement a secret liberal agenda. Trump's warm relationship with CNN did not last forever; by the end of his campaign, his supporters were chanting "CNN sucks" at rallies.

As with Trump's relationship with the media, Trump's favoritism on Capitol Hill will be situational. What Trump's overtures say to me is Trump wants the option to work closely with Democrats on some priorities, such as infrastructure and perhaps child care subsidies.

On other issues, such as taxes and environmental regulation, he'll probably work solely with Republicans. On trade policy he might want to form a mixed bipartisan coalition in Congress.

By being able to work both sides of the aisle and build situation-specific coalitions, Trump would have a much more powerful presidency than if he pursued a narrow Republican-only strategy. And I doubt he'll get in much trouble with Republican voters for it.

One thing we learned during this presidential campaign is Trump draws much more loyalty from Republican base voters than congressional leaders do. If Trump partners with Democrats on a piece of legislation and demands to know why Ryan and McConnell won't bring it to the floor, it will be Ryan and McConnell who come under base pressure, not Trump.

Trump has been a Republican since 2012. He has changed political parties at least five times in his adult life. The only policy issue on which he has expressed consistent views through the decades is trade. He has no apparent ideological attachment to the idea of smaller government. He has a long history of making, breaking, and remaking alliances.

Given all that, it is entirely unsurprising that Trump would want to leave his options open on the policy he can make during his presidency — and therefore he must have open lines with both parties.

*I am a paid contributor to MSNBC, a competitor to both CNN and Fox News Channel.

This is an editorial. The opinions and conclusions expressed above are those of the author.