OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/devtools/browser_list_tabcontents_provider.h" | 5 #include "chrome/browser/devtools/browser_list_tabcontents_provider.h" |
6 | 6 |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "chrome/browser/history/top_sites.h" | 8 #include "chrome/browser/history/top_sites.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/profiles/profile_manager.h" | 10 #include "chrome/browser/profiles/profile_manager.h" |
11 #include "chrome/browser/ui/browser.h" | 11 #include "chrome/browser/ui/browser.h" |
12 #include "chrome/browser/ui/browser_commands.h" | 12 #include "chrome/browser/ui/browser_commands.h" |
13 #include "chrome/browser/ui/browser_list.h" | 13 #include "chrome/browser/ui/browser_list.h" |
14 #include "chrome/browser/ui/browser_tabstrip.h" | 14 #include "chrome/browser/ui/browser_tabstrip.h" |
15 #include "chrome/common/chrome_paths.h" | 15 #include "chrome/common/chrome_paths.h" |
16 #include "content/public/browser/browser_thread.h" | |
17 #include "content/public/browser/web_contents.h" | 16 #include "content/public/browser/web_contents.h" |
18 #include "content/public/common/url_constants.h" | 17 #include "content/public/common/url_constants.h" |
19 #include "grit/devtools_discovery_page_resources.h" | 18 #include "grit/devtools_discovery_page_resources.h" |
20 #include "net/url_request/url_request_context_getter.h" | 19 #include "net/url_request/url_request_context_getter.h" |
21 #include "ui/base/resource/resource_bundle.h" | 20 #include "ui/base/resource/resource_bundle.h" |
22 | 21 |
23 using content::DevToolsHttpHandlerDelegate; | 22 using content::DevToolsHttpHandlerDelegate; |
24 using content::RenderViewHost; | 23 using content::RenderViewHost; |
25 | 24 |
26 BrowserListTabContentsProvider::BrowserListTabContentsProvider( | 25 BrowserListTabContentsProvider::BrowserListTabContentsProvider( |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 86 |
88 if (BrowserList::empty()) | 87 if (BrowserList::empty()) |
89 return NULL; | 88 return NULL; |
90 | 89 |
91 content::WebContents* web_contents = chrome::AddSelectedTabWithURL( | 90 content::WebContents* web_contents = chrome::AddSelectedTabWithURL( |
92 *BrowserList::begin(), | 91 *BrowserList::begin(), |
93 GURL(chrome::kAboutBlankURL), | 92 GURL(chrome::kAboutBlankURL), |
94 content::PAGE_TRANSITION_LINK); | 93 content::PAGE_TRANSITION_LINK); |
95 return web_contents->GetRenderViewHost(); | 94 return web_contents->GetRenderViewHost(); |
96 } | 95 } |
OLD | NEW |