Are you in the biggest room?
Ruby 2.0, 133 characters

A collaboration with @Ventero.  Always a good sign when it starts breaking the syntax highlighter!

This is a recursive flood-fill solution.  Reads from STDIN and outputs to STDOUT:

f=-&gt;*a{a.product([~n=$_.to_i,-1,1,n+1]){|p,d|a|=[p]if$_[p+=d]&lt;?.}!=a ?f[*a]:a.size}
gets(p).scan(/ /){$*&lt;&lt;f[$`.size]}
p$*.max&lt;f[~/X/]


See it running on Ideone.