summaryrefslogtreecommitdiffstats
path: root/ios/web/public/favicon_url.h
blob: 762ce852242d8f1790e753105232ff342c970ac1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef IOS_WEB_PUBLIC_FAVICON_URL_
#define IOS_WEB_PUBLIC_FAVICON_URL_

#include <vector>

#include "ui/gfx/geometry/size.h"
#include "url/gurl.h"

namespace web {

// The favicon url from the render.
struct FaviconURL {
  // The icon type in a page. The definition must be same as
  // favicon_base::IconType.
  enum IconType {
    INVALID_ICON = 0x0,
    FAVICON = 1 << 0,
    TOUCH_ICON = 1 << 1,
    TOUCH_PRECOMPOSED_ICON = 1 << 2
  };

  FaviconURL();
  FaviconURL(const GURL& url,
             IconType type,
             const std::vector<gfx::Size>& sizes);
  ~FaviconURL();

  // The url of the icon.
  GURL icon_url;

  // The type of the icon
  IconType icon_type;

  // Icon's bitmaps' size
  std::vector<gfx::Size> icon_sizes;
};

} // namespace web

#endif  // IOS_WEB_PUBLIC_FAVICON_URL_