summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authorskerner@chromium.org <skerner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-03 14:30:06 +0000
committerskerner@chromium.org <skerner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-03 14:30:06 +0000
commite8014aa57edec7e8e237af510200259a762088a8 (patch)
treee22b752991d2f7e5b8a5cb140fbeba8e1f122f6c /chrome/common
parentaaadcd81066a3430b33702288cd56a39986b4326 (diff)
downloadchromium_src-e8014aa57edec7e8e237af510200259a762088a8.zip
chromium_src-e8014aa57edec7e8e237af510200259a762088a8.tar.gz
chromium_src-e8014aa57edec7e8e237af510200259a762088a8.tar.bz2
Allow extension popups to shrink in single process mode.
BUG=None TEST=Manual testing of the news extensions. Review URL: http://codereview.chromium.org/660278 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40517 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/view_types.cc6
-rw-r--r--chrome/common/view_types.h3
2 files changed, 9 insertions, 0 deletions
diff --git a/chrome/common/view_types.cc b/chrome/common/view_types.cc
index fe14fd2..8d212ca 100644
--- a/chrome/common/view_types.cc
+++ b/chrome/common/view_types.cc
@@ -10,3 +10,9 @@ const char* ViewType::kMole = "MOLE";
const char* ViewType::kBackgroundPage = "BACKGROUND";
const char* ViewType::kPopup = "POPUP";
const char* ViewType::kAll = "ALL";
+
+bool ViewType::ShouldAutoResize(ViewType::Type view_type) {
+ return (view_type == EXTENSION_TOOLSTRIP ||
+ view_type == EXTENSION_MOLE ||
+ view_type == EXTENSION_POPUP);
+}
diff --git a/chrome/common/view_types.h b/chrome/common/view_types.h
index 794f9ab..fd94a69 100644
--- a/chrome/common/view_types.h
+++ b/chrome/common/view_types.h
@@ -30,6 +30,9 @@ class ViewType {
static const char* kPopup;
static const char* kAll;
+ // Return true if a view type should automatically resize to fit its contents.
+ static bool ShouldAutoResize(Type);
+
private:
// This class is for scoping only, so you shouldn't create an instance of it.
ViewType() {}