| 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/debugger/browser_list_tabcontents_provider.h" | 5 #include "chrome/browser/debugger/browser_list_tabcontents_provider.h" |
| 6 | 6 |
| 7 #include "chrome/browser/history/top_sites.h" | 7 #include "chrome/browser/history/top_sites.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
| 10 #include "chrome/browser/ui/browser_list.h" | 10 #include "chrome/browser/ui/browser_list.h" |
| 11 #include "content/public/browser/browser_thread.h" | 11 #include "content/public/browser/browser_thread.h" |
| 12 #include "grit/devtools_discovery_page_resources.h" | 12 #include "grit/devtools_discovery_page_resources.h" |
| 13 #include "net/url_request/url_request_context_getter.h" | 13 #include "net/url_request/url_request_context_getter.h" |
| 14 #include "ui/base/layout.h" |
| 14 #include "ui/base/resource/resource_bundle.h" | 15 #include "ui/base/resource/resource_bundle.h" |
| 15 | 16 |
| 16 using content::DevToolsHttpHandlerDelegate; | 17 using content::DevToolsHttpHandlerDelegate; |
| 17 | 18 |
| 18 BrowserListTabContentsProvider::BrowserListTabContentsProvider() { | 19 BrowserListTabContentsProvider::BrowserListTabContentsProvider() { |
| 19 } | 20 } |
| 20 | 21 |
| 21 BrowserListTabContentsProvider::~BrowserListTabContentsProvider() { | 22 BrowserListTabContentsProvider::~BrowserListTabContentsProvider() { |
| 22 } | 23 } |
| 23 | 24 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 34 // TopSites updates itself after a delay. Ask TopSites to update itself | 35 // TopSites updates itself after a delay. Ask TopSites to update itself |
| 35 // when we're about to show the remote debugging landing page. | 36 // when we're about to show the remote debugging landing page. |
| 36 content::BrowserThread::PostTask( | 37 content::BrowserThread::PostTask( |
| 37 content::BrowserThread::UI, | 38 content::BrowserThread::UI, |
| 38 FROM_HERE, | 39 FROM_HERE, |
| 39 base::Bind(&history::TopSites::SyncWithHistory, | 40 base::Bind(&history::TopSites::SyncWithHistory, |
| 40 base::Unretained(ts))); | 41 base::Unretained(ts))); |
| 41 } | 42 } |
| 42 } | 43 } |
| 43 return ResourceBundle::GetSharedInstance().GetRawDataResource( | 44 return ResourceBundle::GetSharedInstance().GetRawDataResource( |
| 44 IDR_DEVTOOLS_DISCOVERY_PAGE_HTML).as_string(); | 45 IDR_DEVTOOLS_DISCOVERY_PAGE_HTML, |
| 46 ui::SCALE_FACTOR_NONE).as_string(); |
| 45 } | 47 } |
| 46 | 48 |
| 47 bool BrowserListTabContentsProvider::BundlesFrontendResources() { | 49 bool BrowserListTabContentsProvider::BundlesFrontendResources() { |
| 48 // We'd like front-end to be served from the WebUI via proxy, hence | 50 // We'd like front-end to be served from the WebUI via proxy, hence |
| 49 // pretend we don't have it bundled. | 51 // pretend we don't have it bundled. |
| 50 return false; | 52 return false; |
| 51 } | 53 } |
| 52 | 54 |
| 53 std::string BrowserListTabContentsProvider::GetFrontendResourcesBaseURL() { | 55 std::string BrowserListTabContentsProvider::GetFrontendResourcesBaseURL() { |
| 54 return "chrome-devtools://devtools/"; | 56 return "chrome-devtools://devtools/"; |
| 55 } | 57 } |
| OLD | NEW |