Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(991)

Unified Diff: chrome/browser/views/frame/browser_view.cc

Issue 160276: mole expand/collapse API (Closed)
Patch Set: mole API Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/views/extensions/extension_shelf.cc ('k') | chrome/chrome.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/frame/browser_view.cc
diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc
index 6d59587cdf356dd52b2da7ce55f584100e18475d..539b1bca57eec61859130e2c5ebc32e531888a00 100644
--- a/chrome/browser/views/frame/browser_view.cc
+++ b/chrome/browser/views/frame/browser_view.cc
@@ -602,8 +602,11 @@ void BrowserView::SetBounds(const gfx::Rect& bounds) {
}
void BrowserView::Close() {
- BubbleSet::iterator bubble = browser_bubbles_.begin();
- for (; bubble != browser_bubbles_.end(); ++bubble)
+ // Make a copy, since the typical behavior is to detach and delete in this
+ // case. Otherwise, the iterator would become invalid.
+ BubbleSet copy = BubbleSet(browser_bubbles_.begin(), browser_bubbles_.end());
+ BubbleSet::iterator bubble = copy.begin();
+ for (; bubble != copy.end(); ++bubble)
(*bubble)->BrowserWindowClosing();
frame_->GetWindow()->Close();
@@ -1476,10 +1479,12 @@ void BrowserView::Init() {
status_bubble_.reset(new StatusBubbleViews(GetWidget()));
- extension_shelf_ = new ExtensionShelf(browser_.get());
- extension_shelf_->
- SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_EXTENSIONS));
- AddChildView(extension_shelf_);
+ if (browser_->SupportsWindowFeature(Browser::FEATURE_EXTENSIONSHELF)) {
+ extension_shelf_ = new ExtensionShelf(browser_.get());
+ extension_shelf_->
+ SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_EXTENSIONS));
+ AddChildView(extension_shelf_);
+ }
#if defined(OS_WIN)
InitSystemMenu();
« no previous file with comments | « chrome/browser/views/extensions/extension_shelf.cc ('k') | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698