| 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 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1373 preview_container_->SetWebContents(NULL); | 1373 preview_container_->SetWebContents(NULL); |
| 1374 contents_->SetPreview(NULL, NULL); | 1374 contents_->SetPreview(NULL, NULL); |
| 1375 delete preview_container_; | 1375 delete preview_container_; |
| 1376 preview_container_ = NULL; | 1376 preview_container_ = NULL; |
| 1377 } | 1377 } |
| 1378 | 1378 |
| 1379 gfx::Rect BrowserView::GetInstantBounds() { | 1379 gfx::Rect BrowserView::GetInstantBounds() { |
| 1380 return contents_->GetPreviewBounds(); | 1380 return contents_->GetPreviewBounds(); |
| 1381 } | 1381 } |
| 1382 | 1382 |
| 1383 void BrowserView::SetInstantPreviewHeight(int value, InstantSizeUnits units) { |
| 1384 contents_->SetPreviewHeight(value, units); |
| 1385 } |
| 1386 |
| 1383 bool BrowserView::IsInstantTabShowing() { | 1387 bool BrowserView::IsInstantTabShowing() { |
| 1384 return preview_container_ != NULL; | 1388 return preview_container_ != NULL; |
| 1385 } | 1389 } |
| 1386 | 1390 |
| 1387 WindowOpenDisposition BrowserView::GetDispositionForPopupBounds( | 1391 WindowOpenDisposition BrowserView::GetDispositionForPopupBounds( |
| 1388 const gfx::Rect& bounds) { | 1392 const gfx::Rect& bounds) { |
| 1389 #if defined(OS_WIN) | 1393 #if defined(OS_WIN) |
| 1390 #if defined(USE_AURA) | 1394 #if defined(USE_AURA) |
| 1391 return NEW_POPUP; | 1395 return NEW_POPUP; |
| 1392 #else | 1396 #else |
| (...skipping 1246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2639 | 2643 |
| 2640 Browser* modal_browser = | 2644 Browser* modal_browser = |
| 2641 browser::FindBrowserWithWebContents(active_dialog->web_contents()); | 2645 browser::FindBrowserWithWebContents(active_dialog->web_contents()); |
| 2642 if (modal_browser && (browser_ != modal_browser)) { | 2646 if (modal_browser && (browser_ != modal_browser)) { |
| 2643 modal_browser->window()->FlashFrame(true); | 2647 modal_browser->window()->FlashFrame(true); |
| 2644 modal_browser->window()->Activate(); | 2648 modal_browser->window()->Activate(); |
| 2645 } | 2649 } |
| 2646 | 2650 |
| 2647 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); | 2651 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); |
| 2648 } | 2652 } |
| OLD | NEW |