disable passing null pointer to CalculateIdealBounds()

R=sky@chromium.org
BUG=NONE

Review URL: https://codereview.chromium.org/26971004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228617 0039d316-1c4b-4281-b951-d872f2087c98
Fix Secondary Window Sizing in Content Shell.

In my quest to fix fast/dom/Window/open-window-min-size.html layout test,
I have travelled far and wide outside my Blink comfort zone.

In this adventure, I've encountered and slayed (or I think I did) these
two ogres:

1) Creating a secondary Shell window was hooked up in the wrong place. Instead
of using AddNewContent, which is when a new window should be created ("do it!"), this used
to be on WebContentsCreated, which is just to notify the delegate about
 new windows ("heads ups, new contents coming up!"). This prevented secondary
Shell windows from ever knowing their sizes. I fixed this by moving the hook
to the right place.

2) This triggered the need for handling the case when Blink asks for a default-sized window. In such cases, it sends 0 width/height. I repurposed a similar check used when creating new primary windows.

3) Sizing of a secondary window was a no-op from the perspective of the
RenderWidgetHostView, which actually caches the size/bound locally. This resulted
in secondary windows mostly always 0-sized on Linux in headless
(dump-render-tree) mode. I fixed this by just delegating
the sizing to RenderWidgetHostView, since it does the right thing anyway.

Out of the corner of my eye, I saw a few other monsters lurking around, but
my blade was running dull, and I was scared sh*tless already, so I scurried
out of the field while I had my wits about.

BUG=231880
TEST=fast/dom/Window/open-window-min-size.html
R=brettw, jam, jochen
BUG=

Review URL: https://codereview.chromium.org/26983003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228618 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 228618