| 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 #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 1691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1702 // the window below. | 1702 // the window below. |
| 1703 if (!browser_->ShouldCloseWindow()) | 1703 if (!browser_->ShouldCloseWindow()) |
| 1704 return false; | 1704 return false; |
| 1705 | 1705 |
| 1706 if (!browser_->tabstrip_model()->empty()) { | 1706 if (!browser_->tabstrip_model()->empty()) { |
| 1707 // Tab strip isn't empty. Hide the frame (so it appears to have closed | 1707 // Tab strip isn't empty. Hide the frame (so it appears to have closed |
| 1708 // immediately) and close all the tabs, allowing the renderers to shut | 1708 // immediately) and close all the tabs, allowing the renderers to shut |
| 1709 // down. When the tab strip is empty we'll be called back again. | 1709 // down. When the tab strip is empty we'll be called back again. |
| 1710 frame_->Hide(); | 1710 frame_->Hide(); |
| 1711 browser_->OnWindowClosing(); | 1711 browser_->OnWindowClosing(); |
| 1712 return false; | 1712 return false; |
| 1713 } | 1713 } |
| 1714 | 1714 |
| 1715 // Empty TabStripModel, it's now safe to allow the Window to be closed. | 1715 // Empty TabStripModel, it's now safe to allow the Window to be closed. |
| 1716 content::NotificationService::current()->Notify( | 1716 content::NotificationService::current()->Notify( |
| 1717 chrome::NOTIFICATION_WINDOW_CLOSED, | 1717 chrome::NOTIFICATION_WINDOW_CLOSED, |
| 1718 content::Source<gfx::NativeWindow>(frame_->GetNativeWindow()), | 1718 content::Source<gfx::NativeWindow>(frame_->GetNativeWindow()), |
| 1719 content::NotificationService::NoDetails()); | 1719 content::NotificationService::NoDetails()); |
| 1720 return true; | 1720 return true; |
| 1721 } | 1721 } |
| 1722 | 1722 |
| (...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2564 browser::CreateViewsBubble(bubble); | 2564 browser::CreateViewsBubble(bubble); |
| 2565 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); | 2565 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); |
| 2566 bubble->Show(); | 2566 bubble->Show(); |
| 2567 } | 2567 } |
| 2568 | 2568 |
| 2569 void BrowserView::ShowAvatarBubbleFromAvatarButton() { | 2569 void BrowserView::ShowAvatarBubbleFromAvatarButton() { |
| 2570 AvatarMenuButton* button = frame_->GetAvatarMenuButton(); | 2570 AvatarMenuButton* button = frame_->GetAvatarMenuButton(); |
| 2571 if (button) | 2571 if (button) |
| 2572 button->ShowAvatarBubble(); | 2572 button->ShowAvatarBubble(); |
| 2573 } | 2573 } |
| OLD | NEW |