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

Unified Diff: components/doodle/doodle_fetcher.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/doodle/BUILD.gn ('k') | components/doodle/doodle_types.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/doodle/doodle_fetcher.h
diff --git a/components/doodle/doodle_fetcher.h b/components/doodle/doodle_fetcher.h
index 009dc552bdaaa7584c06a7f4b6fe746cca6e1a11..951bbad3913a5605fa4208b1b0c6e86c8805bd5c 100644
--- a/components/doodle/doodle_fetcher.h
+++ b/components/doodle/doodle_fetcher.h
@@ -15,6 +15,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "base/optional.h"
+#include "components/doodle/doodle_types.h"
#include "net/url_request/url_fetcher_delegate.h"
#include "net/url_request/url_request_context_getter.h"
#include "url/gurl.h"
@@ -29,59 +30,6 @@ class Value;
namespace doodle {
-enum class DoodleState {
- AVAILABLE,
- NO_DOODLE,
- DOWNLOAD_ERROR,
- PARSING_ERROR,
-};
-
-enum class DoodleType {
- UNKNOWN,
- SIMPLE,
- RANDOM,
- VIDEO,
- INTERACTIVE,
- INLINE_INTERACTIVE,
- SLIDESHOW,
-};
-
-// Information about a Doodle image. If the image is invalid, the |url| will be
-// empty and invalid. By default the dimensions are 0.
-struct DoodleImage {
- DoodleImage();
- ~DoodleImage();
-
- GURL url;
- int height;
- int width;
- bool is_animated_gif;
- bool is_cta;
-
- // Copying and assignment allowed.
-};
-
-// All information about a current doodle that can be fetched from the remote
-// end. By default, all URLs are empty and therefore invalid.
-struct DoodleConfig {
- DoodleConfig();
- DoodleConfig(const DoodleConfig& config); // = default;
- ~DoodleConfig();
-
- DoodleType doodle_type;
- std::string alt_text;
- std::string interactive_html;
-
- base::Time expiry_date;
- GURL search_url;
- GURL target_url;
- GURL fullpage_interactive_url;
-
- DoodleImage large_image;
- DoodleImage large_cta_image;
- DoodleImage transparent_large_image;
-};
-
// This class provides information about any recent doodle.
// It works asynchronously and calls a callback when finished fetching the
// information from the remote enpoint.
« no previous file with comments | « components/doodle/BUILD.gn ('k') | components/doodle/doodle_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698