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

Unified Diff: chrome/common/extensions/manifest_handlers/linked_app_icons.h

Issue 1066623008: Sync bookmark app icon urls and sizes, and download icons for new apps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated sync value conversions Created 5 years, 8 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/extensions/manifest_handlers/linked_app_icons.h
diff --git a/chrome/common/extensions/manifest_handlers/linked_app_icons.h b/chrome/common/extensions/manifest_handlers/linked_app_icons.h
new file mode 100644
index 0000000000000000000000000000000000000000..ec984bebc00e4293c821bc70558beccee922a379
--- /dev/null
+++ b/chrome/common/extensions/manifest_handlers/linked_app_icons.h
@@ -0,0 +1,53 @@
+// 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_EXTENSIONS_MANIFEST_HANDLERS_LINKED_APP_ICONS_H_
+#define CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_LINKED_APP_ICONS_H_
+
+#include <vector>
+
+#include "extensions/common/extension.h"
+#include "extensions/common/manifest_handler.h"
+
+namespace base {
+class DictionaryValue;
+}
+
+namespace extensions {
+
+// A structure to hold the parsed linked app icon data.
+struct LinkedAppIcons : public Extension::ManifestData {
+ struct IconInfo {
+ IconInfo();
+ ~IconInfo();
+
+ GURL url;
+ int size;
+ };
+
+ LinkedAppIcons();
+ ~LinkedAppIcons() override;
+
+ static const LinkedAppIcons& GetLinkedAppIcons(const Extension* extension);
+
+ std::vector<IconInfo> icons;
+};
+
+// Parses the "app.linked_icons" manifest key.
+class LinkedAppIconsHandler : public ManifestHandler {
+ public:
+ LinkedAppIconsHandler();
+ ~LinkedAppIconsHandler() override;
+
+ bool Parse(Extension* extension, base::string16* error) override;
+
+ private:
+ const std::vector<std::string> Keys() const override;
+
+ DISALLOW_COPY_AND_ASSIGN(LinkedAppIconsHandler);
+};
+
+} // namespace extensions
+
+#endif // CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_LINKED_APP_ICONS_H_
« no previous file with comments | « chrome/common/extensions/chrome_manifest_handlers.cc ('k') | chrome/common/extensions/manifest_handlers/linked_app_icons.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698