This source file includes following definitions.
- next_desktop_type_
- Next
- NextBrowserListIfAtEnd
#include "chrome/browser/ui/browser_iterator.h"
namespace chrome {
BrowserIterator::BrowserIterator()
: current_browser_list_(BrowserList::GetInstance(HOST_DESKTOP_TYPE_FIRST)),
current_iterator_(current_browser_list_->begin()),
next_desktop_type_(
static_cast<HostDesktopType>(HOST_DESKTOP_TYPE_FIRST + 1)) {
NextBrowserListIfAtEnd();
}
BrowserIterator::~BrowserIterator() {
}
void BrowserIterator::Next() {
++current_iterator_;
NextBrowserListIfAtEnd();
}
void BrowserIterator::NextBrowserListIfAtEnd() {
while (current_iterator_ == current_browser_list_->end() &&
next_desktop_type_ < HOST_DESKTOP_TYPE_COUNT) {
current_browser_list_ = BrowserList::GetInstance(next_desktop_type_);
current_iterator_ = current_browser_list_->begin();
next_desktop_type_ = static_cast<HostDesktopType>(next_desktop_type_ + 1);
}
}
}