+ // If we're initializing the surface without a controller (possible on startup
+ // where the surface creation can happen before the native window delegate
+ // IPCs arrive), initialize the size to a valid value such that surface
+ // creation doesn't fail.
+ gfx::Size size(1, 1);
+ if (window_delegate_->GetController()) {
+ size = window_delegate_->GetController()->GetModeSize();
+ }