Add width and height to chrome.tabs.Tab.

This allows extension to properly resize the tab to the right aspect ratio.

BUG=224352

Review URL: https://chromiumcodereview.appspot.com/23108007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218033 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/extensions/extension_tab_util.cc b/chrome/browser/extensions/extension_tab_util.cc
index 8b427ab..9a0c9f70 100644
--- a/chrome/browser/extensions/extension_tab_util.cc
+++ b/chrome/browser/extensions/extension_tab_util.cc
@@ -28,6 +28,7 @@
 #include "content/public/browser/favicon_status.h"
 #include "content/public/browser/navigation_entry.h"
 #include "content/public/browser/web_contents.h"
+#include "content/public/browser/web_contents_view.h"
 #include "url/gurl.h"
 
 namespace keys = extensions::tabs_constants;
@@ -144,6 +145,10 @@
                      tab_strip && tab_strip->IsTabPinned(tab_index));
   result->SetBoolean(keys::kIncognitoKey,
                      contents->GetBrowserContext()->IsOffTheRecord());
+  result->SetInteger(keys::kWidthKey,
+                     contents->GetView()->GetContainerSize().width());
+  result->SetInteger(keys::kHeightKey,
+                     contents->GetView()->GetContainerSize().height());
 
   // Privacy-sensitive fields: these should be stripped off by
   // ScrubTabValueForExtension if the extension should not see them.