BURLINGAME, Calif. — Donald J. Trump got a taste on Friday of what his next month of campaigning in California could be like. He was forced to exit his motorcade and walk through a field, climbing an embankment with Secret Service agents helping him, to avoid angry demonstrators on the street.

“We went under a fence and through a fence, and oh, boy, it felt like I was crossing the border, actually,” Mr. Trump said when he finally made it to a ballroom to speak at California’s Republican Party convention.

For the next 25 minutes, though, Mr. Trump spoke little of California or its June 7 primary. Rather, he wrestled with whether he wanted to begin healing the fractured party he was seeking to lead. Mr. Trump, the Republican front-runner in the presidential race, mocked his conservative critics and his current and former rivals as dumb, “disgusting” and losers. He claimed at least twice that he could win even if the party did not come together. And with some conservatives still uneasy about his beliefs, he breezily dismissed questions about his principles.

“Folks, I’m a conservative, but at this point, who cares? We got to straighten out the country,” he said at a subdued luncheon of party activists who seemed more curious about seeing a celebrity than enthusiastic about their potential presidential nominee.