| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/views/frame/browser_view.h" | 5 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 1346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1357 preview_container_->SetWebContents(NULL); | 1357 preview_container_->SetWebContents(NULL); |
| 1358 contents_->SetPreview(NULL, NULL); | 1358 contents_->SetPreview(NULL, NULL); |
| 1359 delete preview_container_; | 1359 delete preview_container_; |
| 1360 preview_container_ = NULL; | 1360 preview_container_ = NULL; |
| 1361 } | 1361 } |
| 1362 | 1362 |
| 1363 gfx::Rect BrowserView::GetInstantBounds() { | 1363 gfx::Rect BrowserView::GetInstantBounds() { |
| 1364 return contents_->GetPreviewBounds(); | 1364 return contents_->GetPreviewBounds(); |
| 1365 } | 1365 } |
| 1366 | 1366 |
| 1367 bool BrowserView::IsInstantTabShowing() { |
| 1368 return preview_container_ != NULL; |
| 1369 } |
| 1370 |
| 1367 WindowOpenDisposition BrowserView::GetDispositionForPopupBounds( | 1371 WindowOpenDisposition BrowserView::GetDispositionForPopupBounds( |
| 1368 const gfx::Rect& bounds) { | 1372 const gfx::Rect& bounds) { |
| 1369 #if defined(OS_WIN) | 1373 #if defined(OS_WIN) |
| 1370 #if defined(USE_AURA) | 1374 #if defined(USE_AURA) |
| 1371 return NEW_POPUP; | 1375 return NEW_POPUP; |
| 1372 #else | 1376 #else |
| 1373 // If we are in windows metro-mode, we can't allow popup windows. | 1377 // If we are in windows metro-mode, we can't allow popup windows. |
| 1374 return base::win::IsMetroProcess() ? NEW_BACKGROUND_TAB : NEW_POPUP; | 1378 return base::win::IsMetroProcess() ? NEW_BACKGROUND_TAB : NEW_POPUP; |
| 1375 #endif | 1379 #endif |
| 1376 #else | 1380 #else |
| (...skipping 1233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2610 | 2614 |
| 2611 Browser* modal_browser = | 2615 Browser* modal_browser = |
| 2612 browser::FindBrowserWithWebContents(active_dialog->web_contents()); | 2616 browser::FindBrowserWithWebContents(active_dialog->web_contents()); |
| 2613 if (modal_browser && (browser_ != modal_browser)) { | 2617 if (modal_browser && (browser_ != modal_browser)) { |
| 2614 modal_browser->window()->FlashFrame(true); | 2618 modal_browser->window()->FlashFrame(true); |
| 2615 modal_browser->window()->Activate(); | 2619 modal_browser->window()->Activate(); |
| 2616 } | 2620 } |
| 2617 | 2621 |
| 2618 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); | 2622 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); |
| 2619 } | 2623 } |
| OLD | NEW |