OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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/views/frame/browser_view.h" | 5 #include "chrome/browser/views/frame/browser_view.h" |
6 | 6 |
7 #if defined(OS_LINUX) | 7 #if defined(OS_LINUX) |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
560 kDefaultPluginMessageResponseTimeout); | 560 kDefaultPluginMessageResponseTimeout); |
561 prefs->RegisterIntegerPref(prefs::kHungPluginDetectFrequency, | 561 prefs->RegisterIntegerPref(prefs::kHungPluginDetectFrequency, |
562 kDefaultHungPluginDetectFrequency); | 562 kDefaultHungPluginDetectFrequency); |
563 } | 563 } |
564 | 564 |
565 void BrowserView::AttachBrowserBubble(BrowserBubble* bubble) { | 565 void BrowserView::AttachBrowserBubble(BrowserBubble* bubble) { |
566 browser_bubbles_.insert(bubble); | 566 browser_bubbles_.insert(bubble); |
567 } | 567 } |
568 | 568 |
569 void BrowserView::DetachBrowserBubble(BrowserBubble* bubble) { | 569 void BrowserView::DetachBrowserBubble(BrowserBubble* bubble) { |
570 browser_bubbles_.erase(bubble); | 570 BubbleSet::iterator it = browser_bubbles_.find(bubble); |
| 571 if (it != browser_bubbles_.end()) |
| 572 browser_bubbles_.erase(it); |
571 } | 573 } |
572 | 574 |
573 /////////////////////////////////////////////////////////////////////////////// | 575 /////////////////////////////////////////////////////////////////////////////// |
574 // BrowserView, BrowserWindow implementation: | 576 // BrowserView, BrowserWindow implementation: |
575 | 577 |
576 void BrowserView::Show() { | 578 void BrowserView::Show() { |
577 // If the window is already visible, just activate it. | 579 // If the window is already visible, just activate it. |
578 if (frame_->GetWindow()->IsVisible()) { | 580 if (frame_->GetWindow()->IsVisible()) { |
579 frame_->GetWindow()->Activate(); | 581 frame_->GetWindow()->Activate(); |
580 return; | 582 return; |
(...skipping 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1755 | 1757 |
1756 // static | 1758 // static |
1757 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { | 1759 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { |
1758 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); | 1760 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); |
1759 } | 1761 } |
1760 | 1762 |
1761 // static | 1763 // static |
1762 void BrowserList::AllBrowsersClosed() { | 1764 void BrowserList::AllBrowsersClosed() { |
1763 views::Window::CloseAllSecondaryWindows(); | 1765 views::Window::CloseAllSecondaryWindows(); |
1764 } | 1766 } |
OLD | NEW |