Index: chrome/browser/ui/views/frame/browser_view.cc |
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc |
index 711715d5705a956aa711c98732be20974088ba6e..e72e16e232217b6570aefe8924ab5f2001639a2e 100644 |
--- a/chrome/browser/ui/views/frame/browser_view.cc |
+++ b/chrome/browser/ui/views/frame/browser_view.cc |
@@ -109,6 +109,7 @@ |
#include "chrome/browser/ui/views/accelerator_table.h" |
#include "chrome/browser/ui/views/aura/chrome_shell_delegate.h" |
#include "chrome/browser/ui/views/aura/launcher_icon_updater.h" |
+#include "ui/aura/desktop.h" |
#include "ui/aura_shell/launcher/launcher.h" |
#include "ui/aura_shell/launcher/launcher_model.h" |
#include "ui/aura_shell/shell.h" |
@@ -1292,6 +1293,18 @@ gfx::Rect BrowserView::GetInstantBounds() { |
WindowOpenDisposition BrowserView::GetDispositionForPopupBounds( |
const gfx::Rect& bounds) { |
+#if defined(USE_AURA) && defined(OS_CHROMEOS) |
+ // If a popup is larger than a given fraction of the screen, turn it into |
+ // a foreground tab. Also check for width or height == 0, which would |
+ // indicate a tab sized popup window. |
+ gfx::Size size = aura::Desktop::GetInstance()->GetHostSize(); |
sky
2011/11/18 20:21:05
Use screen instead.
Where was the code for this ha
sadrul
2011/11/18 20:29:25
Done. (chrome/browser/chromeos/frame/browser_view.
|
+ if (bounds.width() > size.width() || |
+ bounds.width() == 0 || |
+ bounds.height() > size.height() || |
+ bounds.height() == 0) { |
+ return NEW_FOREGROUND_TAB; |
+ } |
+#endif |
return NEW_POPUP; |
} |