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 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
945 views::View* focused_view = GetFocusManager()->GetFocusedView(); | 945 views::View* focused_view = GetFocusManager()->GetFocusedView(); |
946 if (focused_view) | 946 if (focused_view) |
947 view_storage->StoreView(last_focused_view_storage_id_, focused_view); | 947 view_storage->StoreView(last_focused_view_storage_id_, focused_view); |
948 } | 948 } |
949 | 949 |
950 void BrowserView::DestroyBrowser() { | 950 void BrowserView::DestroyBrowser() { |
951 // Explicitly delete the BookmarkBarView now. That way we don't have to | 951 // Explicitly delete the BookmarkBarView now. That way we don't have to |
952 // worry about the BookmarkBarView potentially outliving the Browser & | 952 // worry about the BookmarkBarView potentially outliving the Browser & |
953 // Profile. | 953 // Profile. |
954 bookmark_bar_view_.reset(); | 954 bookmark_bar_view_.reset(); |
955 // Ditto for DownloadShelfView. | |
956 download_shelf_.reset(); | |
Ben Goodger (Google)
2011/06/01 20:47:50
My question is - what other views are there that t
asanka
2011/06/01 21:06:42
This is called by BrowserList::CloseAllBrowsers(),
| |
955 browser_.reset(); | 957 browser_.reset(); |
956 } | 958 } |
957 | 959 |
958 bool BrowserView::IsBookmarkBarVisible() const { | 960 bool BrowserView::IsBookmarkBarVisible() const { |
959 return browser_->SupportsWindowFeature(Browser::FEATURE_BOOKMARKBAR) && | 961 return browser_->SupportsWindowFeature(Browser::FEATURE_BOOKMARKBAR) && |
960 active_bookmark_bar_ && | 962 active_bookmark_bar_ && |
961 (active_bookmark_bar_->GetPreferredSize().height() != 0); | 963 (active_bookmark_bar_->GetPreferredSize().height() != 0); |
962 } | 964 } |
963 | 965 |
964 bool BrowserView::IsBookmarkBarAnimating() const { | 966 bool BrowserView::IsBookmarkBarAnimating() const { |
(...skipping 1636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2601 view->GetWindow()->non_client_view()->SetAccessibleName( | 2603 view->GetWindow()->non_client_view()->SetAccessibleName( |
2602 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); | 2604 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); |
2603 return view; | 2605 return view; |
2604 } | 2606 } |
2605 #endif | 2607 #endif |
2606 | 2608 |
2607 // static | 2609 // static |
2608 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { | 2610 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { |
2609 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); | 2611 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); |
2610 } | 2612 } |
OLD | NEW |