| 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 1678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1689 status_bubble_->Reposition(); | 1689 status_bubble_->Reposition(); |
| 1690 | 1690 |
| 1691 chrome::HideBookmarkBubbleView(); | 1691 chrome::HideBookmarkBubbleView(); |
| 1692 | 1692 |
| 1693 // Close the omnibox popup, if any. | 1693 // Close the omnibox popup, if any. |
| 1694 LocationBarView* location_bar_view = GetLocationBarView(); | 1694 LocationBarView* location_bar_view = GetLocationBarView(); |
| 1695 if (location_bar_view) | 1695 if (location_bar_view) |
| 1696 location_bar_view->GetLocationEntry()->ClosePopup(); | 1696 location_bar_view->GetLocationEntry()->ClosePopup(); |
| 1697 } | 1697 } |
| 1698 | 1698 |
| 1699 views::Widget* BrowserView::GetWidget() { | |
| 1700 return View::GetWidget(); | |
| 1701 } | |
| 1702 | |
| 1703 const views::Widget* BrowserView::GetWidget() const { | |
| 1704 return View::GetWidget(); | |
| 1705 } | |
| 1706 | |
| 1707 /////////////////////////////////////////////////////////////////////////////// | 1699 /////////////////////////////////////////////////////////////////////////////// |
| 1708 // BrowserView, views::ClientView overrides: | 1700 // BrowserView, views::ClientView overrides: |
| 1709 | 1701 |
| 1710 bool BrowserView::CanClose() { | 1702 bool BrowserView::CanClose() { |
| 1711 // You cannot close a frame for which there is an active originating drag | 1703 // You cannot close a frame for which there is an active originating drag |
| 1712 // session. | 1704 // session. |
| 1713 if (tabstrip_ && !tabstrip_->IsTabStripCloseable()) | 1705 if (tabstrip_ && !tabstrip_->IsTabStripCloseable()) |
| 1714 return false; | 1706 return false; |
| 1715 | 1707 |
| 1716 // Give beforeunload handlers the chance to cancel the close before we hide | 1708 // Give beforeunload handlers the chance to cancel the close before we hide |
| (...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2565 bubble->Show(); | 2557 bubble->Show(); |
| 2566 } | 2558 } |
| 2567 | 2559 |
| 2568 void BrowserView::RestackLocationBarContainer() { | 2560 void BrowserView::RestackLocationBarContainer() { |
| 2569 #if defined(USE_AURA) | 2561 #if defined(USE_AURA) |
| 2570 if (search_view_controller_.get()) | 2562 if (search_view_controller_.get()) |
| 2571 search_view_controller_->StackAtTop(); | 2563 search_view_controller_->StackAtTop(); |
| 2572 #endif | 2564 #endif |
| 2573 toolbar_->location_bar_container()->StackAtTop(); | 2565 toolbar_->location_bar_container()->StackAtTop(); |
| 2574 } | 2566 } |
| OLD | NEW |