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

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

Issue 10080017: Switch platform apps from a declarative launch container to handling an onLaunched event. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: remove debug logging code 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
« no previous file with comments | « chrome/common/extensions/api/extension_api.cc ('k') | chrome/common/extensions/extension.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 bool is_platform_app() const; 658 bool is_platform_app() const;
659 bool is_hosted_app() const; 659 bool is_hosted_app() const;
660 bool is_packaged_app() const; 660 bool is_packaged_app() const;
661 bool is_storage_isolated() const { return is_app() && is_storage_isolated_; } 661 bool is_storage_isolated() const { return is_app() && is_storage_isolated_; }
662 const URLPatternSet& web_extent() const { return extent_; } 662 const URLPatternSet& web_extent() const { return extent_; }
663 const std::string& launch_local_path() const { return launch_local_path_; } 663 const std::string& launch_local_path() const { return launch_local_path_; }
664 const std::string& launch_web_url() const { return launch_web_url_; } 664 const std::string& launch_web_url() const { return launch_web_url_; }
665 extension_misc::LaunchContainer launch_container() const { 665 extension_misc::LaunchContainer launch_container() const {
666 return launch_container_; 666 return launch_container_;
667 } 667 }
668 int launch_width() const { 668 int launch_width() const { return launch_width_; }
669 return std::max(launch_min_width_, 669 int launch_height() const { return launch_height_; }
670 launch_max_width_ ?
671 std::min(launch_max_width_, launch_width_) :
672 launch_width_);
673 }
674 int launch_height() const {
675 return std::max(launch_min_height_,
676 launch_max_height_ ?
677 std::min(launch_max_height_, launch_height_) :
678 launch_height_);
679 }
680 int launch_min_width() const { return launch_min_width_; }
681 int launch_min_height() const { return launch_min_height_; }
682 int launch_max_width() const { return launch_max_width_; }
683 int launch_max_height() const { return launch_max_height_; }
684 670
685 // Theme-related. 671 // Theme-related.
686 bool is_theme() const; 672 bool is_theme() const;
687 base::DictionaryValue* GetThemeImages() const { return theme_images_.get(); } 673 base::DictionaryValue* GetThemeImages() const { return theme_images_.get(); }
688 base::DictionaryValue* GetThemeColors() const {return theme_colors_.get(); } 674 base::DictionaryValue* GetThemeColors() const {return theme_colors_.get(); }
689 base::DictionaryValue* GetThemeTints() const { return theme_tints_.get(); } 675 base::DictionaryValue* GetThemeTints() const { return theme_tints_.get(); }
690 base::DictionaryValue* GetThemeDisplayProperties() const { 676 base::DictionaryValue* GetThemeDisplayProperties() const {
691 return theme_display_properties_.get(); 677 return theme_display_properties_.get();
692 } 678 }
693 679
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
1040 // users can override the way each app launches. See 1026 // users can override the way each app launches. See
1041 // ExtensionPrefs::GetLaunchContainer(), which looks at a per-app pref 1027 // ExtensionPrefs::GetLaunchContainer(), which looks at a per-app pref
1042 // to decide what container an app will launch in. 1028 // to decide what container an app will launch in.
1043 extension_misc::LaunchContainer launch_container_; 1029 extension_misc::LaunchContainer launch_container_;
1044 1030
1045 // The default size of the container when launching. Only respected for 1031 // The default size of the container when launching. Only respected for
1046 // containers like panels and windows. 1032 // containers like panels and windows.
1047 int launch_width_; 1033 int launch_width_;
1048 int launch_height_; 1034 int launch_height_;
1049 1035
1050 // The minimum and maximum size of the container. Only respected for the
1051 // shell container.
1052 int launch_min_width_;
1053 int launch_min_height_;
1054 int launch_max_width_;
1055 int launch_max_height_;
1056
1057 // The Omnibox keyword for this extension, or empty if there is none. 1036 // The Omnibox keyword for this extension, or empty if there is none.
1058 std::string omnibox_keyword_; 1037 std::string omnibox_keyword_;
1059 1038
1060 // List of text-to-speech voices that this extension provides, if any. 1039 // List of text-to-speech voices that this extension provides, if any.
1061 std::vector<TtsVoice> tts_voices_; 1040 std::vector<TtsVoice> tts_voices_;
1062 1041
1063 // The OAuth2 client id and scopes, if specified by the extension. 1042 // The OAuth2 client id and scopes, if specified by the extension.
1064 OAuth2Info oauth2_info_; 1043 OAuth2Info oauth2_info_;
1065 1044
1066 // List of intent services that this extension provides, if any. 1045 // List of intent services that this extension provides, if any.
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
1136 // only contain the removed permissions. 1115 // only contain the removed permissions.
1137 const ExtensionPermissionSet* permissions; 1116 const ExtensionPermissionSet* permissions;
1138 1117
1139 UpdatedExtensionPermissionsInfo( 1118 UpdatedExtensionPermissionsInfo(
1140 const Extension* extension, 1119 const Extension* extension,
1141 const ExtensionPermissionSet* permissions, 1120 const ExtensionPermissionSet* permissions,
1142 Reason reason); 1121 Reason reason);
1143 }; 1122 };
1144 1123
1145 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ 1124 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/extension_api.cc ('k') | chrome/common/extensions/extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698