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