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

Unified Diff: chrome/common/favicon/fallback_icon_url_parser.h

Issue 835903005: [Favicon] Add new fallback icon rendering flow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding new host chrome://fallback-icon. Created 5 years, 11 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
Index: chrome/common/favicon/fallback_icon_url_parser.h
diff --git a/chrome/common/favicon/fallback_icon_url_parser.h b/chrome/common/favicon/fallback_icon_url_parser.h
new file mode 100644
index 0000000000000000000000000000000000000000..491adb617802dfe6c75b675d5b1615e1efb034f0
--- /dev/null
+++ b/chrome/common/favicon/fallback_icon_url_parser.h
@@ -0,0 +1,35 @@
+// Copyright 2015 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 CHROME_COMMON_FAVICON_FALLBACK_ICON_URL_PARSER_H_
+#define CHROME_COMMON_FAVICON_FALLBACK_ICON_URL_PARSER_H_
+
+#include <string>
+
+#include "components/favicon_base/fallback_icon_style_builder.h"
+
+namespace chrome {
+
+struct ParsedFallbackIconPath {
+ // The URL from which the fallback icon is being requested.
+ std::string url;
+
+ // The size of the requested fallback icon in dip.
+ int size_in_dip;
+
+ // The device scale factor of the requested fallback icon.
+ float device_scale_factor;
+
+ // Specifications of fallback icon. This is nullptr if no fallback.
+ favicon_base::FallbackIconStyleBuilder style_builder;
+};
+
+// Parses |path|,which should be in the format described at the top of the
+// file "chrome/browser/ui/webui/fallback_icon_source.h".
+bool ParseFallbackIconPath(const std::string& path,
+ ParsedFallbackIconPath* parsed);
+
+} // namespace chrome
+
+#endif // CHROME_COMMON_FAVICON_FALLBACK_ICON_URL_PARSER_H_

Powered by Google App Engine
This is Rietveld 408576698