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 1344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1355 preview_container_->SetWebContents(NULL); | 1355 preview_container_->SetWebContents(NULL); |
1356 contents_->SetPreview(NULL, NULL); | 1356 contents_->SetPreview(NULL, NULL); |
1357 delete preview_container_; | 1357 delete preview_container_; |
1358 preview_container_ = NULL; | 1358 preview_container_ = NULL; |
1359 } | 1359 } |
1360 | 1360 |
1361 gfx::Rect BrowserView::GetInstantBounds() { | 1361 gfx::Rect BrowserView::GetInstantBounds() { |
1362 return contents_->GetPreviewBounds(); | 1362 return contents_->GetPreviewBounds(); |
1363 } | 1363 } |
1364 | 1364 |
| 1365 gfx::Rect BrowserView::GetIsShowingInstant() { |
| 1366 return preview_container_; |
| 1367 } |
| 1368 |
1365 WindowOpenDisposition BrowserView::GetDispositionForPopupBounds( | 1369 WindowOpenDisposition BrowserView::GetDispositionForPopupBounds( |
1366 const gfx::Rect& bounds) { | 1370 const gfx::Rect& bounds) { |
1367 #if defined(OS_WIN) | 1371 #if defined(OS_WIN) |
1368 #if defined(USE_AURA) | 1372 #if defined(USE_AURA) |
1369 return NEW_POPUP; | 1373 return NEW_POPUP; |
1370 #else | 1374 #else |
1371 // If we are in windows metro-mode, we can't allow popup windows. | 1375 // If we are in windows metro-mode, we can't allow popup windows. |
1372 return base::win::IsMetroProcess() ? NEW_BACKGROUND_TAB : NEW_POPUP; | 1376 return base::win::IsMetroProcess() ? NEW_BACKGROUND_TAB : NEW_POPUP; |
1373 #endif | 1377 #endif |
1374 #else | 1378 #else |
(...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2602 | 2606 |
2603 Browser* modal_browser = | 2607 Browser* modal_browser = |
2604 browser::FindBrowserWithWebContents(active_dialog->web_contents()); | 2608 browser::FindBrowserWithWebContents(active_dialog->web_contents()); |
2605 if (modal_browser && (browser_ != modal_browser)) { | 2609 if (modal_browser && (browser_ != modal_browser)) { |
2606 modal_browser->window()->FlashFrame(true); | 2610 modal_browser->window()->FlashFrame(true); |
2607 modal_browser->window()->Activate(); | 2611 modal_browser->window()->Activate(); |
2608 } | 2612 } |
2609 | 2613 |
2610 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); | 2614 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); |
2611 } | 2615 } |
OLD | NEW |