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 "components/favicon/core/favicon_handler.h" | 5 #include "components/favicon/core/favicon_handler.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "chrome/browser/favicon/chrome_favicon_client_factory.h" | 8 #include "chrome/browser/favicon/chrome_favicon_client_factory.h" |
9 #include "chrome/browser/favicon/favicon_service_factory.h" | 9 #include "chrome/browser/favicon/favicon_service_factory.h" |
10 #include "chrome/browser/favicon/favicon_tab_helper.h" | 10 #include "chrome/browser/favicon/favicon_tab_helper.h" |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 update_active_favicon_ = update_active_favicon; | 224 update_active_favicon_ = update_active_favicon; |
225 if (!update_active_favicon) | 225 if (!update_active_favicon) |
226 return; | 226 return; |
227 | 227 |
228 ++num_active_favicon_; | 228 ++num_active_favicon_; |
229 SetActiveFaviconURL(icon_url); | 229 SetActiveFaviconURL(icon_url); |
230 SetActiveFaviconValidity(true); | 230 SetActiveFaviconValidity(true); |
231 SetActiveFaviconImage(image); | 231 SetActiveFaviconImage(image); |
232 } | 232 } |
233 | 233 |
| 234 void NotifyFaviconUpdated(bool icon_url_changed) override {} |
| 235 |
234 size_t num_active_favicon() const { return num_active_favicon_; } | 236 size_t num_active_favicon() const { return num_active_favicon_; } |
235 size_t num_favicon_available() const { return num_favicon_available_; } | 237 size_t num_favicon_available() const { return num_favicon_available_; } |
236 void ResetNumActiveFavicon() { num_active_favicon_ = 0; } | 238 void ResetNumActiveFavicon() { num_active_favicon_ = 0; } |
237 void ResetNumFaviconAvailable() { num_favicon_available_ = 0; } | 239 void ResetNumFaviconAvailable() { num_favicon_available_ = 0; } |
238 | 240 |
239 void SetActiveURL(GURL url) { url_ = url; } | 241 void SetActiveURL(GURL url) { url_ = url; } |
240 | 242 |
241 const gfx::Image available_favicon() { return available_image_; } | 243 const gfx::Image available_favicon() { return available_image_; } |
242 | 244 |
243 const GURL available_icon_url() { return available_icon_url_; } | 245 const GURL available_icon_url() { return available_icon_url_; } |
(...skipping 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1635 EXPECT_EQ(new_favicon_url, driver1.available_icon_url()); | 1637 EXPECT_EQ(new_favicon_url, driver1.available_icon_url()); |
1636 EXPECT_FALSE(driver1.update_active_favicon()); | 1638 EXPECT_FALSE(driver1.update_active_favicon()); |
1637 EXPECT_EQ(3u, driver1.num_favicon_available()); | 1639 EXPECT_EQ(3u, driver1.num_favicon_available()); |
1638 } | 1640 } |
1639 | 1641 |
1640 INSTANTIATE_TEST_CASE_P(FaviconHandlerTestActiveFaviconValidityTrueOrFalse, | 1642 INSTANTIATE_TEST_CASE_P(FaviconHandlerTestActiveFaviconValidityTrueOrFalse, |
1641 FaviconHandlerActiveFaviconValidityParamTest, | 1643 FaviconHandlerActiveFaviconValidityParamTest, |
1642 ::testing::Bool()); | 1644 ::testing::Bool()); |
1643 | 1645 |
1644 } // namespace. | 1646 } // namespace. |
OLD | NEW |