OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 1517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1528 bookmark_bar_view_->SetBookmarkBarState( | 1528 bookmark_bar_view_->SetBookmarkBarState( |
1529 browser_->bookmark_bar_state(), | 1529 browser_->bookmark_bar_state(), |
1530 BookmarkBar::DONT_ANIMATE_STATE_CHANGE); | 1530 BookmarkBar::DONT_ANIMATE_STATE_CHANGE); |
1531 } | 1531 } |
1532 UpdateUIForContents(new_contents); | 1532 UpdateUIForContents(new_contents); |
1533 | 1533 |
1534 // Layout for DevTools _before_ setting the main WebContents to avoid | 1534 // Layout for DevTools _before_ setting the main WebContents to avoid |
1535 // toggling the size of the main WebContents. | 1535 // toggling the size of the main WebContents. |
1536 UpdateDevToolsForContents(new_contents); | 1536 UpdateDevToolsForContents(new_contents); |
1537 | 1537 |
1538 if (change_tab_contents) { | 1538 if (change_tab_contents) |
1539 contents_container_->SetWebContents(new_contents); | 1539 contents_container_->SetWebContents(new_contents); |
1540 contents_->MaybeStackOverlayAtTop(); | |
1541 } | |
1542 | 1540 |
1543 if (!browser_->tab_strip_model()->closing_all() && GetWidget()->IsActive() && | 1541 if (!browser_->tab_strip_model()->closing_all() && GetWidget()->IsActive() && |
1544 GetWidget()->IsVisible()) { | 1542 GetWidget()->IsVisible()) { |
1545 // We only restore focus if our window is visible, to avoid invoking blur | 1543 // We only restore focus if our window is visible, to avoid invoking blur |
1546 // handlers when we are eventually shown. | 1544 // handlers when we are eventually shown. |
1547 new_contents->GetView()->RestoreFocus(); | 1545 new_contents->GetView()->RestoreFocus(); |
1548 } | 1546 } |
1549 | 1547 |
1550 // Update all the UI bits. | 1548 // Update all the UI bits. |
1551 UpdateTitleBar(); | 1549 UpdateTitleBar(); |
(...skipping 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2708 | 2706 |
2709 Browser* modal_browser = | 2707 Browser* modal_browser = |
2710 chrome::FindBrowserWithWebContents(active_dialog->web_contents()); | 2708 chrome::FindBrowserWithWebContents(active_dialog->web_contents()); |
2711 if (modal_browser && (browser_ != modal_browser)) { | 2709 if (modal_browser && (browser_ != modal_browser)) { |
2712 modal_browser->window()->FlashFrame(true); | 2710 modal_browser->window()->FlashFrame(true); |
2713 modal_browser->window()->Activate(); | 2711 modal_browser->window()->Activate(); |
2714 } | 2712 } |
2715 | 2713 |
2716 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); | 2714 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); |
2717 } | 2715 } |
OLD | NEW |