OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #if defined(TOOLKIT_USES_GTK) | 7 #if defined(TOOLKIT_USES_GTK) |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 1415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1426 infobar_container_->ChangeTabContents(NULL); | 1426 infobar_container_->ChangeTabContents(NULL); |
1427 UpdateSidebarForContents(NULL); | 1427 UpdateSidebarForContents(NULL); |
1428 UpdateDevToolsForContents(NULL); | 1428 UpdateDevToolsForContents(NULL); |
1429 } | 1429 } |
1430 } | 1430 } |
1431 | 1431 |
1432 void BrowserView::TabDeactivated(TabContentsWrapper* contents) { | 1432 void BrowserView::TabDeactivated(TabContentsWrapper* contents) { |
1433 // We do not store the focus when closing the tab to work-around bug 4633. | 1433 // We do not store the focus when closing the tab to work-around bug 4633. |
1434 // Some reports seem to show that the focus manager and/or focused view can | 1434 // Some reports seem to show that the focus manager and/or focused view can |
1435 // be garbage at that point, it is not clear why. | 1435 // be garbage at that point, it is not clear why. |
1436 if (!contents->tab_contents()->is_being_destroyed()) | 1436 if (!contents->tab_contents()->IsBeingDestroyed()) |
1437 contents->tab_contents()->GetView()->StoreFocus(); | 1437 contents->tab_contents()->GetView()->StoreFocus(); |
1438 } | 1438 } |
1439 | 1439 |
1440 void BrowserView::ActiveTabChanged(TabContentsWrapper* old_contents, | 1440 void BrowserView::ActiveTabChanged(TabContentsWrapper* old_contents, |
1441 TabContentsWrapper* new_contents, | 1441 TabContentsWrapper* new_contents, |
1442 int index, | 1442 int index, |
1443 bool user_gesture) { | 1443 bool user_gesture) { |
1444 ProcessTabSelected(new_contents); | 1444 ProcessTabSelected(new_contents); |
1445 } | 1445 } |
1446 | 1446 |
(...skipping 1207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2654 browser::CreateViewsBubble(bubble); | 2654 browser::CreateViewsBubble(bubble); |
2655 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); | 2655 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); |
2656 bubble->Show(); | 2656 bubble->Show(); |
2657 } | 2657 } |
2658 | 2658 |
2659 void BrowserView::ShowAvatarBubbleFromAvatarButton() { | 2659 void BrowserView::ShowAvatarBubbleFromAvatarButton() { |
2660 AvatarMenuButton* button = frame_->GetAvatarMenuButton(); | 2660 AvatarMenuButton* button = frame_->GetAvatarMenuButton(); |
2661 if (button) | 2661 if (button) |
2662 button->ShowAvatarBubble(); | 2662 button->ShowAvatarBubble(); |
2663 } | 2663 } |
OLD | NEW |