| 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 #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 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 const gfx::Image& image); | 238 const gfx::Image& image); |
| 239 | 239 |
| 240 // Return the current candidate if any. | 240 // Return the current candidate if any. |
| 241 content::FaviconURL* current_candidate() { | 241 content::FaviconURL* current_candidate() { |
| 242 return (image_urls_.size() > 0) ? &image_urls_[0] : NULL; | 242 return (image_urls_.size() > 0) ? &image_urls_[0] : NULL; |
| 243 } | 243 } |
| 244 | 244 |
| 245 // Returns the preferred_icon_size according icon_types_, 0 means no | 245 // Returns the preferred_icon_size according icon_types_, 0 means no |
| 246 // preference. | 246 // preference. |
| 247 int preferred_icon_size() { | 247 int preferred_icon_size() { |
| 248 #if defined(OS_ANDROID) |
| 249 return 0; |
| 250 #else |
| 248 return icon_types_ == chrome::FAVICON ? gfx::kFaviconSize : 0; | 251 return icon_types_ == chrome::FAVICON ? gfx::kFaviconSize : 0; |
| 252 #endif |
| 249 } | 253 } |
| 250 | 254 |
| 251 // Used for FaviconService requests. | 255 // Used for FaviconService requests. |
| 252 CancelableTaskTracker cancelable_task_tracker_; | 256 CancelableTaskTracker cancelable_task_tracker_; |
| 253 | 257 |
| 254 // URL of the page we're requesting the favicon for. | 258 // URL of the page we're requesting the favicon for. |
| 255 GURL url_; | 259 GURL url_; |
| 256 | 260 |
| 257 // Whether we got the initial response for the favicon back from the renderer. | 261 // Whether we got the initial response for the favicon back from the renderer. |
| 258 bool got_favicon_from_history_; | 262 bool got_favicon_from_history_; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 282 // This handler's delegate. | 286 // This handler's delegate. |
| 283 FaviconHandlerDelegate* delegate_; // weak | 287 FaviconHandlerDelegate* delegate_; // weak |
| 284 | 288 |
| 285 // Current favicon candidate. | 289 // Current favicon candidate. |
| 286 FaviconCandidate favicon_candidate_; | 290 FaviconCandidate favicon_candidate_; |
| 287 | 291 |
| 288 DISALLOW_COPY_AND_ASSIGN(FaviconHandler); | 292 DISALLOW_COPY_AND_ASSIGN(FaviconHandler); |
| 289 }; | 293 }; |
| 290 | 294 |
| 291 #endif // CHROME_BROWSER_FAVICON_FAVICON_HANDLER_H_ | 295 #endif // CHROME_BROWSER_FAVICON_FAVICON_HANDLER_H_ |
| OLD | NEW |