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 "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "chrome/browser/extensions/extension_host.h" | 9 #include "chrome/browser/extensions/extension_host.h" |
10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 } | 71 } |
72 | 72 |
73 std::string BrowserListTabContentsProvider::GetPageThumbnailData( | 73 std::string BrowserListTabContentsProvider::GetPageThumbnailData( |
74 const GURL& url) { | 74 const GURL& url) { |
75 for (chrome::BrowserIterator it; !it.done(); it.Next()) { | 75 for (chrome::BrowserIterator it; !it.done(); it.Next()) { |
76 Profile* profile = (*it)->profile(); | 76 Profile* profile = (*it)->profile(); |
77 history::TopSites* top_sites = profile->GetTopSites(); | 77 history::TopSites* top_sites = profile->GetTopSites(); |
78 if (!top_sites) | 78 if (!top_sites) |
79 continue; | 79 continue; |
80 scoped_refptr<base::RefCountedMemory> data; | 80 scoped_refptr<base::RefCountedMemory> data; |
81 if (top_sites->GetPageThumbnail(url, &data)) | 81 if (top_sites->GetPageThumbnail(url, false, &data)) |
82 return std::string( | 82 return std::string( |
83 reinterpret_cast<const char*>(data->front()), data->size()); | 83 reinterpret_cast<const char*>(data->front()), data->size()); |
84 } | 84 } |
85 | 85 |
86 return std::string(); | 86 return std::string(); |
87 } | 87 } |
88 | 88 |
89 RenderViewHost* BrowserListTabContentsProvider::CreateNewTarget() { | 89 RenderViewHost* BrowserListTabContentsProvider::CreateNewTarget() { |
90 const BrowserList* browser_list = | 90 const BrowserList* browser_list = |
91 BrowserList::GetInstance(host_desktop_type_); | 91 BrowserList::GetInstance(host_desktop_type_); |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 .PassAs<net::StreamListenSocket>(); | 151 .PassAs<net::StreamListenSocket>(); |
152 } | 152 } |
153 #else | 153 #else |
154 scoped_ptr<net::StreamListenSocket> | 154 scoped_ptr<net::StreamListenSocket> |
155 BrowserListTabContentsProvider::CreateSocketForTethering( | 155 BrowserListTabContentsProvider::CreateSocketForTethering( |
156 net::StreamListenSocket::Delegate* delegate, | 156 net::StreamListenSocket::Delegate* delegate, |
157 std::string* name) { | 157 std::string* name) { |
158 return scoped_ptr<net::StreamListenSocket>(); | 158 return scoped_ptr<net::StreamListenSocket>(); |
159 } | 159 } |
160 #endif // defined(DEBUG_DEVTOOLS) | 160 #endif // defined(DEBUG_DEVTOOLS) |
OLD | NEW |