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

Side by Side Diff: chrome/common/extensions/extension.h

Issue 9969087: Switch platform apps from a declarative launch container to handling an onLaunched event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Bring back 512x384 default bounds. Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 bool is_platform_app() const; 640 bool is_platform_app() const;
641 bool is_hosted_app() const; 641 bool is_hosted_app() const;
642 bool is_packaged_app() const; 642 bool is_packaged_app() const;
643 bool is_storage_isolated() const { return is_app() && is_storage_isolated_; } 643 bool is_storage_isolated() const { return is_app() && is_storage_isolated_; }
644 const URLPatternSet& web_extent() const { return extent_; } 644 const URLPatternSet& web_extent() const { return extent_; }
645 const std::string& launch_local_path() const { return launch_local_path_; } 645 const std::string& launch_local_path() const { return launch_local_path_; }
646 const std::string& launch_web_url() const { return launch_web_url_; } 646 const std::string& launch_web_url() const { return launch_web_url_; }
647 extension_misc::LaunchContainer launch_container() const { 647 extension_misc::LaunchContainer launch_container() const {
648 return launch_container_; 648 return launch_container_;
649 } 649 }
650 int launch_width() const { 650 int launch_width() const { return launch_width_; }
651 return std::max(launch_min_width_, 651 int launch_height() const { return launch_height_; }
652 launch_max_width_ ?
653 std::min(launch_max_width_, launch_width_) :
654 launch_width_);
655 }
656 int launch_height() const {
657 return std::max(launch_min_height_,
658 launch_max_height_ ?
659 std::min(launch_max_height_, launch_height_) :
660 launch_height_);
661 }
662 int launch_min_width() const { return launch_min_width_; }
663 int launch_min_height() const { return launch_min_height_; }
664 int launch_max_width() const { return launch_max_width_; }
665 int launch_max_height() const { return launch_max_height_; }
666 652
667 // Theme-related. 653 // Theme-related.
668 bool is_theme() const; 654 bool is_theme() const;
669 base::DictionaryValue* GetThemeImages() const { return theme_images_.get(); } 655 base::DictionaryValue* GetThemeImages() const { return theme_images_.get(); }
670 base::DictionaryValue* GetThemeColors() const {return theme_colors_.get(); } 656 base::DictionaryValue* GetThemeColors() const {return theme_colors_.get(); }
671 base::DictionaryValue* GetThemeTints() const { return theme_tints_.get(); } 657 base::DictionaryValue* GetThemeTints() const { return theme_tints_.get(); }
672 base::DictionaryValue* GetThemeDisplayProperties() const { 658 base::DictionaryValue* GetThemeDisplayProperties() const {
673 return theme_display_properties_.get(); 659 return theme_display_properties_.get();
674 } 660 }
675 661
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
1015 // users can override the way each app launches. See 1001 // users can override the way each app launches. See
1016 // ExtensionPrefs::GetLaunchContainer(), which looks at a per-app pref 1002 // ExtensionPrefs::GetLaunchContainer(), which looks at a per-app pref
1017 // to decide what container an app will launch in. 1003 // to decide what container an app will launch in.
1018 extension_misc::LaunchContainer launch_container_; 1004 extension_misc::LaunchContainer launch_container_;
1019 1005
1020 // The default size of the container when launching. Only respected for 1006 // The default size of the container when launching. Only respected for
1021 // containers like panels and windows. 1007 // containers like panels and windows.
1022 int launch_width_; 1008 int launch_width_;
1023 int launch_height_; 1009 int launch_height_;
1024 1010
1025 // The minimum and maximum size of the container. Only respected for the
1026 // shell container.
1027 int launch_min_width_;
1028 int launch_min_height_;
1029 int launch_max_width_;
1030 int launch_max_height_;
1031
1032 // The Omnibox keyword for this extension, or empty if there is none. 1011 // The Omnibox keyword for this extension, or empty if there is none.
1033 std::string omnibox_keyword_; 1012 std::string omnibox_keyword_;
1034 1013
1035 // List of text-to-speech voices that this extension provides, if any. 1014 // List of text-to-speech voices that this extension provides, if any.
1036 std::vector<TtsVoice> tts_voices_; 1015 std::vector<TtsVoice> tts_voices_;
1037 1016
1038 // The OAuth2 client id and scopes, if specified by the extension. 1017 // The OAuth2 client id and scopes, if specified by the extension.
1039 OAuth2Info oauth2_info_; 1018 OAuth2Info oauth2_info_;
1040 1019
1041 // List of intent services that this extension provides, if any. 1020 // List of intent services that this extension provides, if any.
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
1111 // only contain the removed permissions. 1090 // only contain the removed permissions.
1112 const ExtensionPermissionSet* permissions; 1091 const ExtensionPermissionSet* permissions;
1113 1092
1114 UpdatedExtensionPermissionsInfo( 1093 UpdatedExtensionPermissionsInfo(
1115 const Extension* extension, 1094 const Extension* extension,
1116 const ExtensionPermissionSet* permissions, 1095 const ExtensionPermissionSet* permissions,
1117 Reason reason); 1096 Reason reason);
1118 }; 1097 };
1119 1098
1120 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ 1099 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698