| Index: chrome/browser/devtools/browser_list_tabcontents_provider.cc
|
| ===================================================================
|
| --- chrome/browser/devtools/browser_list_tabcontents_provider.cc (revision 201865)
|
| +++ chrome/browser/devtools/browser_list_tabcontents_provider.cc (working copy)
|
| @@ -19,6 +19,7 @@
|
| #include "chrome/browser/ui/browser_tabstrip.h"
|
| #include "chrome/browser/ui/host_desktop.h"
|
| #include "chrome/browser/ui/tab_contents/tab_contents_iterator.h"
|
| +#include "chrome/browser/ui/tabs/tab_strip_model.h"
|
| #include "chrome/common/chrome_paths.h"
|
| #include "content/public/browser/web_contents.h"
|
| #include "content/public/common/url_constants.h"
|
| @@ -91,12 +92,13 @@
|
| const BrowserList* browser_list =
|
| BrowserList::GetInstance(host_desktop_type_);
|
|
|
| - if (browser_list->empty())
|
| + if (browser_list->empty()) {
|
| chrome::NewEmptyWindow(profile_, host_desktop_type_);
|
| + return browser_list->empty() ? NULL :
|
| + browser_list->get(0)->tab_strip_model()->GetActiveWebContents()->
|
| + GetRenderViewHost();
|
| + }
|
|
|
| - if (browser_list->empty())
|
| - return NULL;
|
| -
|
| content::WebContents* web_contents = chrome::AddSelectedTabWithURL(
|
| browser_list->get(0),
|
| GURL(content::kAboutBlankURL),
|
|
|