| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_FAVICON_FAVICON_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_FAVICON_FAVICON_HANDLER_H_ |
| 6 #define CHROME_BROWSER_FAVICON_FAVICON_HANDLER_H_ | 6 #define CHROME_BROWSER_FAVICON_FAVICON_HANDLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 | 10 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 // download the favicon. | 57 // download the favicon. |
| 58 // . Otherwise we ask the history database to update the mapping from | 58 // . Otherwise we ask the history database to update the mapping from |
| 59 // page url to favicon url and call us back with the favicon. Remember, it is | 59 // page url to favicon url and call us back with the favicon. Remember, it is |
| 60 // possible for the db to already have the favicon, just not the mapping | 60 // possible for the db to already have the favicon, just not the mapping |
| 61 // between page to favicon url. The callback for this is OnFaviconData. | 61 // between page to favicon url. The callback for this is OnFaviconData. |
| 62 // | 62 // |
| 63 // OnFaviconData either updates the favicon of the NavigationEntry (if the | 63 // OnFaviconData either updates the favicon of the NavigationEntry (if the |
| 64 // db knew about the favicon), or requests the renderer to download the | 64 // db knew about the favicon), or requests the renderer to download the |
| 65 // favicon. | 65 // favicon. |
| 66 // | 66 // |
| 67 // When the renderer downloads the favicon SetFaviconImageData is invoked, | 67 // When the renderer downloads the favicon SetFavicon is invoked, |
| 68 // at which point we update the favicon of the NavigationEntry and notify | 68 // at which point we update the favicon of the NavigationEntry and notify |
| 69 // the database to save the favicon. | 69 // the database to save the favicon. |
| 70 | 70 |
| 71 class FaviconHandler { | 71 class FaviconHandler { |
| 72 public: | 72 public: |
| 73 enum Type { | 73 enum Type { |
| 74 FAVICON, | 74 FAVICON, |
| 75 TOUCH, | 75 TOUCH, |
| 76 }; | 76 }; |
| 77 | 77 |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 | 252 |
| 253 // The FaviconData from history. | 253 // The FaviconData from history. |
| 254 history::FaviconData history_icon_; | 254 history::FaviconData history_icon_; |
| 255 | 255 |
| 256 TabContents* tab_contents_; | 256 TabContents* tab_contents_; |
| 257 | 257 |
| 258 DISALLOW_COPY_AND_ASSIGN(FaviconHandler); | 258 DISALLOW_COPY_AND_ASSIGN(FaviconHandler); |
| 259 }; | 259 }; |
| 260 | 260 |
| 261 #endif // CHROME_BROWSER_FAVICON_FAVICON_HANDLER_H_ | 261 #endif // CHROME_BROWSER_FAVICON_FAVICON_HANDLER_H_ |
| OLD | NEW |