| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_APP_LAUNCH_INFO_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_APP_LAUNCH_INFO_H_ |
| 6 #define CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_APP_LAUNCH_INFO_H_ | 6 #define CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_APP_LAUNCH_INFO_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "chrome/common/extensions/extension_constants.h" | 11 #include "chrome/common/extensions/extension_constants.h" |
| 12 #include "extensions/common/extension.h" | 12 #include "extensions/common/extension.h" |
| 13 #include "extensions/common/manifest.h" | 13 #include "extensions/common/manifest.h" |
| 14 #include "extensions/common/manifest_handler.h" | 14 #include "extensions/common/manifest_handler.h" |
| 15 #include "url/gurl.h" | 15 #include "url/gurl.h" |
| 16 | 16 |
| 17 namespace extensions { | 17 namespace extensions { |
| 18 | 18 |
| 19 // Container that holds the parsed app launch data. | 19 // Container that holds the parsed app launch data. |
| 20 class AppLaunchInfo : public Extension::ManifestData { | 20 class AppLaunchInfo : public Extension::ManifestData { |
| 21 public: | 21 public: |
| 22 AppLaunchInfo(); | 22 AppLaunchInfo(); |
| 23 virtual ~AppLaunchInfo(); | 23 ~AppLaunchInfo() override; |
| 24 | 24 |
| 25 // Get the local path inside the extension to use with the launcher. | 25 // Get the local path inside the extension to use with the launcher. |
| 26 static const std::string& GetLaunchLocalPath(const Extension* extension); | 26 static const std::string& GetLaunchLocalPath(const Extension* extension); |
| 27 | 27 |
| 28 // Get the absolute web url to use with the launcher. | 28 // Get the absolute web url to use with the launcher. |
| 29 static const GURL& GetLaunchWebURL(const Extension* extension); | 29 static const GURL& GetLaunchWebURL(const Extension* extension); |
| 30 | 30 |
| 31 // The window type that an app's manifest specifies to launch into. | 31 // The window type that an app's manifest specifies to launch into. |
| 32 // This is not always the window type an app will open into, because | 32 // This is not always the window type an app will open into, because |
| 33 // users can override the way each app launches. See | 33 // users can override the way each app launches. See |
| (...skipping 26 matching lines...) Expand all Loading... |
| 60 int launch_width_; | 60 int launch_width_; |
| 61 int launch_height_; | 61 int launch_height_; |
| 62 | 62 |
| 63 DISALLOW_COPY_AND_ASSIGN(AppLaunchInfo); | 63 DISALLOW_COPY_AND_ASSIGN(AppLaunchInfo); |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 // Parses all app launch related keys in the manifest. | 66 // Parses all app launch related keys in the manifest. |
| 67 class AppLaunchManifestHandler : public ManifestHandler { | 67 class AppLaunchManifestHandler : public ManifestHandler { |
| 68 public: | 68 public: |
| 69 AppLaunchManifestHandler(); | 69 AppLaunchManifestHandler(); |
| 70 virtual ~AppLaunchManifestHandler(); | 70 ~AppLaunchManifestHandler() override; |
| 71 | 71 |
| 72 virtual bool Parse(Extension* extension, base::string16* error) override; | 72 bool Parse(Extension* extension, base::string16* error) override; |
| 73 virtual bool AlwaysParseForType(Manifest::Type type) const override; | 73 bool AlwaysParseForType(Manifest::Type type) const override; |
| 74 | 74 |
| 75 private: | 75 private: |
| 76 virtual const std::vector<std::string> Keys() const override; | 76 const std::vector<std::string> Keys() const override; |
| 77 | 77 |
| 78 DISALLOW_COPY_AND_ASSIGN(AppLaunchManifestHandler); | 78 DISALLOW_COPY_AND_ASSIGN(AppLaunchManifestHandler); |
| 79 }; | 79 }; |
| 80 | 80 |
| 81 } // namespace extensions | 81 } // namespace extensions |
| 82 | 82 |
| 83 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_APP_LAUNCH_INFO_H_ | 83 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_APP_LAUNCH_INFO_H_ |
| OLD | NEW |