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_bubble_host.h" | 5 #include "chrome/browser/ui/views/frame/browser_bubble_host.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "chrome/browser/ui/views/browser_bubble.h" | 8 #include "chrome/browser/ui/views/browser_bubble.h" |
9 | 9 |
| 10 BrowserBubbleHost::BrowserBubbleHost() {} |
| 11 |
| 12 BrowserBubbleHost::~BrowserBubbleHost() {} |
| 13 |
10 void BrowserBubbleHost::WindowMoved() { | 14 void BrowserBubbleHost::WindowMoved() { |
11 // Do safe iteration in case the bubble winds up closing as a result of this | 15 // Do safe iteration in case the bubble winds up closing as a result of this |
12 // message. | 16 // message. |
13 for (BubbleSet::iterator i = browser_bubbles_.begin(); | 17 for (BubbleSet::iterator i = browser_bubbles_.begin(); |
14 i != browser_bubbles_.end();) { | 18 i != browser_bubbles_.end();) { |
15 BubbleSet::iterator bubble = i++; | 19 BubbleSet::iterator bubble = i++; |
16 (*bubble)->BrowserWindowMoved(); | 20 (*bubble)->BrowserWindowMoved(); |
17 } | 21 } |
18 } | 22 } |
19 | 23 |
(...skipping 14 matching lines...) Expand all Loading... |
34 void BrowserBubbleHost::Close() { | 38 void BrowserBubbleHost::Close() { |
35 // BrowserWindowClosing will usually cause the bubble to remove itself from | 39 // BrowserWindowClosing will usually cause the bubble to remove itself from |
36 // the set, so we need to iterate in a way that's safe against deletion. | 40 // the set, so we need to iterate in a way that's safe against deletion. |
37 for (BubbleSet::iterator i = browser_bubbles_.begin(); | 41 for (BubbleSet::iterator i = browser_bubbles_.begin(); |
38 i != browser_bubbles_.end();) { | 42 i != browser_bubbles_.end();) { |
39 BubbleSet::iterator bubble = i++; | 43 BubbleSet::iterator bubble = i++; |
40 (*bubble)->BrowserWindowClosing(); | 44 (*bubble)->BrowserWindowClosing(); |
41 } | 45 } |
42 } | 46 } |
43 | 47 |
OLD | NEW |