Let $\Omega_i\subseteq \mathbb R^{n_i}$ ($i=1, 2$) be open subsets. Given $K\in\mathscr{D}^\prime(\Omega_1\times \Omega_2)$ one can obtain a continuous linear operator $A:C^\infty(\Omega_2)\longrightarrow \mathscr{D}^\prime(\Omega_1)$ setting $$\langle A\phi, \psi\rangle:=\langle K, \psi\otimes \phi\rangle.$$ Conversely, for every continuous linear operator $A:C^\infty(\Omega_2)\longrightarrow \mathscr{D}^\prime(\Omega_1)$ there is unique $K\in\mathscr{D}^\prime(\Omega_1\times \Omega_2)$ such that: $$\langle A\phi, \psi\rangle=\langle K, \psi\otimes \phi\rangle.$$ This is called Schwartz kernel theorem.
I'm trying to understand the following example: Let $\Omega$ be an open subset of $\mathbb R^n$ and consider the continuous linear operator $A:C^\infty_0(\Omega)\longrightarrow \mathscr{D}^\prime(\Omega)$ given by $$\langle A\phi, \psi\rangle:=\int_{\Omega} \phi(x)\psi(x)\ dx.$$
Definying $K:C^\infty_0(\Omega\times \Omega)\longrightarrow \mathbb C$ by $$\langle K, \phi\rangle:=\int_{\Omega} \phi(x, x)\ dx,$$ we have $K\in\mathscr{D}^\prime(\Omega \times \Omega)$ and $$\langle K, \psi\otimes \phi\rangle=\int_{\Omega} (\psi\otimes \phi)(x, x)\ dx=\int_{\Omega} \psi(x)\phi(x)\ dx=\langle A\phi, \psi\rangle.$$ Hence $K$ is the kernel of $A$ of the Schwartz kernel theorem. Up to this point everything is fine, but then my textbook writes: i.e., $$K(x, y)=\delta(x-y),$$ where $\delta$ is the diract distribution. This is confusing me, can anyone explain me?