Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Side by Side Diff: components/doodle/doodle_types.h

Issue 2710673006: [Doodle] Pull a doodle_types.h out of doodle_fetcher.h (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/doodle/doodle_fetcher.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 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 COMPONENTS_DOODLE_DOODLE_TYPES_H_
6 #define COMPONENTS_DOODLE_DOODLE_TYPES_H_
7
8 #include "url/gurl.h"
9
10 namespace doodle {
11
12 enum class DoodleState {
13 AVAILABLE,
14 NO_DOODLE,
15 DOWNLOAD_ERROR,
16 PARSING_ERROR,
17 };
18
19 enum class DoodleType {
20 UNKNOWN,
21 SIMPLE,
22 RANDOM,
23 VIDEO,
24 INTERACTIVE,
25 INLINE_INTERACTIVE,
26 SLIDESHOW,
27 };
28
29 // Information about a Doodle image. If the image is invalid, the |url| will be
30 // empty and invalid. By default the dimensions are 0.
31 struct DoodleImage {
32 DoodleImage();
33 ~DoodleImage();
34
35 GURL url;
36 int height;
37 int width;
38 bool is_animated_gif;
39 bool is_cta;
40
41 // Copying and assignment allowed.
42 };
43
44 // All information about a current doodle that can be fetched from the remote
45 // end. By default, all URLs are empty and therefore invalid.
46 struct DoodleConfig {
47 DoodleConfig();
48 DoodleConfig(const DoodleConfig& config); // = default;
49 ~DoodleConfig();
50
51 DoodleType doodle_type;
52 std::string alt_text;
53 std::string interactive_html;
54
55 base::Time expiry_date;
56 GURL search_url;
57 GURL target_url;
58 GURL fullpage_interactive_url;
59
60 DoodleImage large_image;
61 DoodleImage large_cta_image;
62 DoodleImage transparent_large_image;
63 };
64
65 } // namespace doodle
66
67 #endif // COMPONENTS_DOODLE_DOODLE_TYPES_H_
OLDNEW
« no previous file with comments | « components/doodle/doodle_fetcher.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698