OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/android/dev_tools_manager_delegate_android.h" | 5 #include "chrome/browser/android/dev_tools_manager_delegate_android.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
11 #include "chrome/browser/android/tab_android.h" | 11 #include "chrome/browser/android/tab_android.h" |
12 #include "chrome/browser/browser_process.h" | 12 #include "chrome/browser/browser_process.h" |
13 #include "chrome/browser/history/top_sites.h" | |
14 #include "chrome/browser/history/top_sites_factory.h" | 13 #include "chrome/browser/history/top_sites_factory.h" |
15 #include "chrome/browser/profiles/profile_manager.h" | 14 #include "chrome/browser/profiles/profile_manager.h" |
16 #include "chrome/browser/ui/android/tab_model/tab_model.h" | 15 #include "chrome/browser/ui/android/tab_model/tab_model.h" |
17 #include "chrome/browser/ui/android/tab_model/tab_model_list.h" | 16 #include "chrome/browser/ui/android/tab_model/tab_model_list.h" |
| 17 #include "components/history/core/browser/top_sites.h" |
18 #include "content/public/browser/devtools_agent_host.h" | 18 #include "content/public/browser/devtools_agent_host.h" |
19 #include "content/public/browser/devtools_target.h" | 19 #include "content/public/browser/devtools_target.h" |
20 #include "content/public/browser/favicon_status.h" | 20 #include "content/public/browser/favicon_status.h" |
21 #include "content/public/browser/navigation_entry.h" | 21 #include "content/public/browser/navigation_entry.h" |
22 #include "content/public/browser/web_contents.h" | 22 #include "content/public/browser/web_contents.h" |
23 | 23 |
24 using content::DevToolsAgentHost; | 24 using content::DevToolsAgentHost; |
25 using content::WebContents; | 25 using content::WebContents; |
26 | 26 |
27 namespace { | 27 namespace { |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 Profile* profile = ProfileManager::GetLastUsedProfile()->GetOriginalProfile(); | 340 Profile* profile = ProfileManager::GetLastUsedProfile()->GetOriginalProfile(); |
341 scoped_refptr<history::TopSites> top_sites = | 341 scoped_refptr<history::TopSites> top_sites = |
342 TopSitesFactory::GetForProfile(profile); | 342 TopSitesFactory::GetForProfile(profile); |
343 if (top_sites) { | 343 if (top_sites) { |
344 scoped_refptr<base::RefCountedMemory> data; | 344 scoped_refptr<base::RefCountedMemory> data; |
345 if (top_sites->GetPageThumbnail(url, false, &data)) | 345 if (top_sites->GetPageThumbnail(url, false, &data)) |
346 return std::string(data->front_as<char>(), data->size()); | 346 return std::string(data->front_as<char>(), data->size()); |
347 } | 347 } |
348 return std::string(); | 348 return std::string(); |
349 } | 349 } |
OLD | NEW |