OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_EXTENSION_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 const URLOverrideMap& GetChromeURLOverrides() const { | 310 const URLOverrideMap& GetChromeURLOverrides() const { |
311 return chrome_url_overrides_; | 311 return chrome_url_overrides_; |
312 } | 312 } |
313 | 313 |
314 bool web_content_enabled() const { return web_content_enabled_; } | 314 bool web_content_enabled() const { return web_content_enabled_; } |
315 const ExtensionExtent& web_extent() const { return web_extent_; } | 315 const ExtensionExtent& web_extent() const { return web_extent_; } |
316 | 316 |
317 const std::string& launch_local_path() const { return launch_local_path_; } | 317 const std::string& launch_local_path() const { return launch_local_path_; } |
318 const std::string& launch_web_url() const { return launch_web_url_; } | 318 const std::string& launch_web_url() const { return launch_web_url_; } |
319 LaunchContainer launch_container() const { return launch_container_; } | 319 LaunchContainer launch_container() const { return launch_container_; } |
| 320 bool launch_fullscreen() const { return launch_fullscreen_; } |
320 | 321 |
321 // Gets the fully resolved absolute launch URL. | 322 // Gets the fully resolved absolute launch URL. |
322 GURL GetFullLaunchURL() const; | 323 GURL GetFullLaunchURL() const; |
323 | 324 |
324 // Runtime data: | 325 // Runtime data: |
325 // Put dynamic data about the state of a running extension below. | 326 // Put dynamic data about the state of a running extension below. |
326 | 327 |
327 // Whether the background page, if any, is ready. We don't load other | 328 // Whether the background page, if any, is ready. We don't load other |
328 // components until then. If there is no background page, we consider it to | 329 // components until then. If there is no background page, we consider it to |
329 // be ready. | 330 // be ready. |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 // Checks that apps features are enabled if the manifest tries to use any of | 365 // Checks that apps features are enabled if the manifest tries to use any of |
365 // them. | 366 // them. |
366 bool CheckAppsAreEnabled(const DictionaryValue* manifest, std::string* error); | 367 bool CheckAppsAreEnabled(const DictionaryValue* manifest, std::string* error); |
367 | 368 |
368 // Helpers to load various chunks of the manifest. | 369 // Helpers to load various chunks of the manifest. |
369 bool LoadWebContentEnabled(const DictionaryValue* manifest, | 370 bool LoadWebContentEnabled(const DictionaryValue* manifest, |
370 std::string* error); | 371 std::string* error); |
371 bool LoadWebOrigin(const DictionaryValue* manifest, std::string* error); | 372 bool LoadWebOrigin(const DictionaryValue* manifest, std::string* error); |
372 bool LoadWebPaths(const DictionaryValue* manifest, std::string* error); | 373 bool LoadWebPaths(const DictionaryValue* manifest, std::string* error); |
373 bool LoadLaunchContainer(const DictionaryValue* manifest, std::string* error); | 374 bool LoadLaunchContainer(const DictionaryValue* manifest, std::string* error); |
| 375 bool LoadLaunchFullscreen(const DictionaryValue* manifest, |
| 376 std::string* error); |
374 bool LoadLaunchURL(const DictionaryValue* manifest, std::string* error); | 377 bool LoadLaunchURL(const DictionaryValue* manifest, std::string* error); |
375 | 378 |
376 // Helper method to load an ExtensionAction from the page_action or | 379 // Helper method to load an ExtensionAction from the page_action or |
377 // browser_action entries in the manifest. | 380 // browser_action entries in the manifest. |
378 ExtensionAction* LoadExtensionActionHelper( | 381 ExtensionAction* LoadExtensionActionHelper( |
379 const DictionaryValue* extension_action, std::string* error); | 382 const DictionaryValue* extension_action, std::string* error); |
380 | 383 |
381 // Figures out if a source contains keys not associated with themes - we | 384 // Figures out if a source contains keys not associated with themes - we |
382 // don't want to allow scripts and such to be bundled with themes. | 385 // don't want to allow scripts and such to be bundled with themes. |
383 bool ContainsNonThemeKeys(const DictionaryValue& source); | 386 bool ContainsNonThemeKeys(const DictionaryValue& source); |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 // The local path inside the extension to use with the launcher. | 495 // The local path inside the extension to use with the launcher. |
493 std::string launch_local_path_; | 496 std::string launch_local_path_; |
494 | 497 |
495 // A web url to use with the launcher. Note that this might be relative or | 498 // A web url to use with the launcher. Note that this might be relative or |
496 // absolute. If relative, it is relative to web_origin_. | 499 // absolute. If relative, it is relative to web_origin_. |
497 std::string launch_web_url_; | 500 std::string launch_web_url_; |
498 | 501 |
499 // The type of container to launch into. | 502 // The type of container to launch into. |
500 LaunchContainer launch_container_; | 503 LaunchContainer launch_container_; |
501 | 504 |
| 505 // Launch full screen by default. |
| 506 bool launch_fullscreen_; |
| 507 |
502 // Cached images for this extension. This maps from the relative_path of the | 508 // Cached images for this extension. This maps from the relative_path of the |
503 // resource to the cached image. | 509 // resource to the cached image. |
504 ImageCache image_cache_; | 510 ImageCache image_cache_; |
505 | 511 |
506 // Runtime data: | 512 // Runtime data: |
507 | 513 |
508 // True if the background page is ready. | 514 // True if the background page is ready. |
509 bool background_page_ready_; | 515 bool background_page_ready_; |
510 | 516 |
511 // True while the extension is being upgraded. | 517 // True while the extension is being upgraded. |
(...skipping 24 matching lines...) Expand all Loading... |
536 scoped_ptr<DictionaryValue> extension_manifest; | 542 scoped_ptr<DictionaryValue> extension_manifest; |
537 std::string extension_id; | 543 std::string extension_id; |
538 FilePath extension_path; | 544 FilePath extension_path; |
539 Extension::Location extension_location; | 545 Extension::Location extension_location; |
540 | 546 |
541 private: | 547 private: |
542 DISALLOW_COPY_AND_ASSIGN(ExtensionInfo); | 548 DISALLOW_COPY_AND_ASSIGN(ExtensionInfo); |
543 }; | 549 }; |
544 | 550 |
545 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 551 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
OLD | NEW |