The two men were at an internet conference on Microsoft's campus that the Chinese government put together to greet Xi.
Xi did a ten minute photo op with executives from the top tech companies in the country, from Facebook to IBM.
Xi Jinping is arguably the strongest leader China has seen since the days of Mao Zedong, founder of the ruling Communist Party. Over the last year and change, he has consolidated power through an anti-corruption campaign that has ensnared the highest level party officials in the last 30 years.
And the Chinese people love that. According to the Pew Research Center, corruption is their biggest concern in the country. Xi has also drummed up support by striking a nationalist tone on issues like China's military activity in the South China Sea.
See more from Xi Jinping's visit, including his time with Tim Cook:
Chinese President Xi Jinping in the USA
Tim Cook described meeting the President of China in one perfect sentence
US President Barack Obama and China's President Xi Jinping walk from the White House to a working dinner at Blair House, on September 24, 2015 in Washington, DC. AFP PHOTO/MANDEL NGAN (Photo credit should read MANDEL NGAN/AFP/Getty Images)
US President Barack Obama and China's President Xi Jinping (R) walk from the White House to a working dinner at Blair House, on September 24, 2015 in Washington, DC. AFP PHOTO/MANDEL NGAN (Photo credit should read MANDEL NGAN/AFP/Getty Images)
SEATTLE, Sept. 23, 2015: Chinese President Xi Jinping addresses a reception held by Chinese community in the United States in Seattle, the United States, Sept. 23, 2015. Xi's wife Peng Liyuan also attended the event on Wednesday. (Xinhua/Huang Jingwen via Getty Images)
SEATTLE, Sept. 23, 2015: Chinese President Xi Jinping, front left, greets a student during his visit to the Lincoln High School in Tacoma of Washington State, the United States, Sept. 23, 2015. (Xinhua/Lan Hongguang via Getty Images)
SEATTLE, Sept. 23, 2015: Chinese President Xi Jinping, second left, presents a sapling of metasequoia to mark the establishment of the Global Innovation Exchange, a partnership jointly established by the University of Washington and Tsinghua University, during his visit to the Microsoft headquarters in Redmond of Washington State, the United States, Sept. 23, 2015. (Xinhua/Lan Hongguang via Getty Images)
WASHINGTON D.C., Sept. 25, 2015-- Chinese President Xi Jinping, second right, and his wife Peng Liyuan, left, are welcomed by U.S. President Barack Obama, right, and his wife Michelle Obama at the White House in Washington D.C., the United States, Sept. 25, 2015. Xi arrived in Washington, the second stop of his state visit to the United States, on Thursday after a busy two-and-a-half-day stay in Seattle. (Xinhua/Pang Xinglei via Getty Images)
U.S. First Lady Michelle Obama, left, adjusts U.S. President Barack Obama's bow-tie prior to greeting Xi Jinping, China's president, and Peng Liyuan, China's first lady, both not pictured, on the North Portico of the White House during a state visit in Washington, D.C., U.S., on Friday, Sept. 25, 2015. The U.S. and China announced agreement obroad anti-hacking principles aimed at stopping the theft of corporate trade secrets though Obama pointedly said he has not ruled out invoking sanctions for violators. Photographer: Pete Marovich/Bloomberg via Getty Images
Discover More Like This
BACK TO SLIDE
Its neighbors — US allies — are worried about China's claims that it has a right to dominate the waters.
Xi maintained that belief, despite US opposition, while speaking at the White House last week.
"We have the right to uphold our own territorial sovereignty and lawful and legitimate maritime rights and interests," he said.