favicon_status.h revision 7dbb3d5cf0c15f500944d211057644d6a2f37371
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
3// found in the LICENSE file.
4
5#ifndef CONTENT_PUBLIC_BROWSER_FAVICON_STATUS_H_
6#define CONTENT_PUBLIC_BROWSER_FAVICON_STATUS_H_
7
8#include "content/common/content_export.h"
9#include "ui/gfx/image/image.h"
10#include "url/gurl.h"
11
12namespace content {
13
14// Collects the favicon related information for a NavigationEntry.
15struct CONTENT_EXPORT FaviconStatus {
16  FaviconStatus();
17
18  // Indicates whether we've gotten an official favicon for the page, or are
19  // just using the default favicon.
20  bool valid;
21
22  // The URL of the favicon which was used to load it off the web.
23  GURL url;
24
25  // The favicon bitmap for the page. If the favicon has not been explicitly
26  // set or it empty, it will return the default favicon. Note that this is
27  // loaded asynchronously, so even if the favicon URL is valid we may return
28  // the default favicon if we haven't gotten the data yet.
29  gfx::Image image;
30
31  // Copy and assignment is explicitly allowed for this struct.
32};
33
34}  // namespace content
35
36#endif  // CONTENT_PUBLIC_BROWSER_FAVICON_STATUS_H_
37