| 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 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1353 if (!preview_container_) | 1353 if (!preview_container_) |
| 1354 return; | 1354 return; |
| 1355 | 1355 |
| 1356 // The contents must be changed before SetPreview is invoked. | 1356 // The contents must be changed before SetPreview is invoked. |
| 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 void BrowserView::SetInstantPreviewHeight(int value, bool is_percent) { |
| 1364 contents_->SetPreviewHeight(value, is_percent); |
| 1365 } |
| 1366 |
| 1363 gfx::Rect BrowserView::GetInstantBounds() { | 1367 gfx::Rect BrowserView::GetInstantBounds() { |
| 1364 return contents_->GetPreviewBounds(); | 1368 return contents_->GetPreviewBounds(); |
| 1365 } | 1369 } |
| 1366 | 1370 |
| 1367 bool BrowserView::IsInstantTabShowing() { | 1371 bool BrowserView::IsInstantTabShowing() { |
| 1368 return preview_container_ != NULL; | 1372 return preview_container_ != NULL; |
| 1369 } | 1373 } |
| 1370 | 1374 |
| 1371 WindowOpenDisposition BrowserView::GetDispositionForPopupBounds( | 1375 WindowOpenDisposition BrowserView::GetDispositionForPopupBounds( |
| 1372 const gfx::Rect& bounds) { | 1376 const gfx::Rect& bounds) { |
| (...skipping 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2615 | 2619 |
| 2616 Browser* modal_browser = | 2620 Browser* modal_browser = |
| 2617 browser::FindBrowserWithWebContents(active_dialog->web_contents()); | 2621 browser::FindBrowserWithWebContents(active_dialog->web_contents()); |
| 2618 if (modal_browser && (browser_ != modal_browser)) { | 2622 if (modal_browser && (browser_ != modal_browser)) { |
| 2619 modal_browser->window()->FlashFrame(true); | 2623 modal_browser->window()->FlashFrame(true); |
| 2620 modal_browser->window()->Activate(); | 2624 modal_browser->window()->Activate(); |
| 2621 } | 2625 } |
| 2622 | 2626 |
| 2623 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); | 2627 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); |
| 2624 } | 2628 } |
| OLD | NEW |