This source file includes following definitions.
- GetTopLevelWidgetForBrowser
#include "chrome/browser/ui/top_level_widget.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "ui/views/widget/widget.h"
namespace chrome {
views::Widget* GetTopLevelWidgetForBrowser(Browser* browser) {
if (!browser)
return NULL;
BrowserWindow* window = browser->window();
if (!window)
return NULL;
BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser);
return browser_view ? browser_view->GetWidget() : NULL;
}
}