#include "chrome/browser/extensions/chrome_extension_function.h"
namespace apps {
-class ShellWindow;
+class AppWindow;
}
namespace extensions {
protected:
virtual ~AppCurrentWindowInternalExtensionFunction() {}
- // Invoked with the current shell window.
- virtual bool RunWithWindow(apps::ShellWindow* window) = 0;
+ // Invoked with the current app window.
+ virtual bool RunWithWindow(apps::AppWindow* window) = 0;
private:
- virtual bool RunImpl() OVERRIDE;
+ virtual bool RunSync() OVERRIDE;
};
class AppCurrentWindowInternalFocusFunction
protected:
virtual ~AppCurrentWindowInternalFocusFunction() {}
- virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
+ virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
};
class AppCurrentWindowInternalFullscreenFunction
protected:
virtual ~AppCurrentWindowInternalFullscreenFunction() {}
- virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
+ virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
};
class AppCurrentWindowInternalMaximizeFunction
protected:
virtual ~AppCurrentWindowInternalMaximizeFunction() {}
- virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
+ virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
};
class AppCurrentWindowInternalMinimizeFunction
protected:
virtual ~AppCurrentWindowInternalMinimizeFunction() {}
- virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
+ virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
};
class AppCurrentWindowInternalRestoreFunction
protected:
virtual ~AppCurrentWindowInternalRestoreFunction() {}
- virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
+ virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
};
class AppCurrentWindowInternalDrawAttentionFunction
protected:
virtual ~AppCurrentWindowInternalDrawAttentionFunction() {}
- virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
+ virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
};
class AppCurrentWindowInternalClearAttentionFunction
protected:
virtual ~AppCurrentWindowInternalClearAttentionFunction() {}
- virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
+ virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
};
class AppCurrentWindowInternalShowFunction
protected:
virtual ~AppCurrentWindowInternalShowFunction() {}
- virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
+ virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
};
class AppCurrentWindowInternalHideFunction
protected:
virtual ~AppCurrentWindowInternalHideFunction() {}
- virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
+ virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
};
class AppCurrentWindowInternalSetBoundsFunction
APP_CURRENTWINDOWINTERNAL_SETBOUNDS)
protected:
virtual ~AppCurrentWindowInternalSetBoundsFunction() {}
- virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
+ virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
};
-class AppCurrentWindowInternalSetMinWidthFunction
+class AppCurrentWindowInternalSetSizeConstraintsFunction
: public AppCurrentWindowInternalExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.setMinWidth",
- APP_CURRENTWINDOWINTERNAL_SETMINWIDTH)
+ DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.setSizeConstraints",
+ APP_CURRENTWINDOWINTERNAL_SETSIZECONSTRAINTS)
protected:
- virtual ~AppCurrentWindowInternalSetMinWidthFunction() {}
- virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
+ virtual ~AppCurrentWindowInternalSetSizeConstraintsFunction() {}
+ virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
};
-class AppCurrentWindowInternalSetMinHeightFunction
+class AppCurrentWindowInternalSetIconFunction
: public AppCurrentWindowInternalExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.setMinHeight",
- APP_CURRENTWINDOWINTERNAL_SETMINHEIGHT)
- protected:
- virtual ~AppCurrentWindowInternalSetMinHeightFunction() {}
- virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
-};
+ DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.setIcon",
+ APP_CURRENTWINDOWINTERNAL_SETICON)
-class AppCurrentWindowInternalSetMaxWidthFunction
- : public AppCurrentWindowInternalExtensionFunction {
- public:
- DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.setMaxWidth",
- APP_CURRENTWINDOWINTERNAL_SETMAXWIDTH)
protected:
- virtual ~AppCurrentWindowInternalSetMaxWidthFunction() {}
- virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
+ virtual ~AppCurrentWindowInternalSetIconFunction() {}
+ virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
};
-class AppCurrentWindowInternalSetMaxHeightFunction
+class AppCurrentWindowInternalSetBadgeIconFunction
: public AppCurrentWindowInternalExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.setMaxHeight",
- APP_CURRENTWINDOWINTERNAL_SETMAXHEIGHT)
+ DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.setBadgeIcon",
+ APP_CURRENTWINDOWINTERNAL_SETBADGEICON)
+
protected:
- virtual ~AppCurrentWindowInternalSetMaxHeightFunction() {}
- virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
+ virtual ~AppCurrentWindowInternalSetBadgeIconFunction() {}
+ virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
};
-class AppCurrentWindowInternalSetIconFunction
+class AppCurrentWindowInternalClearBadgeFunction
: public AppCurrentWindowInternalExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.setIcon",
- APP_CURRENTWINDOWINTERNAL_SETICON)
+ DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.clearBadge",
+ APP_CURRENTWINDOWINTERNAL_CLEARBADGE)
protected:
- virtual ~AppCurrentWindowInternalSetIconFunction() {}
- virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
+ virtual ~AppCurrentWindowInternalClearBadgeFunction() {}
+ virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
};
class AppCurrentWindowInternalSetShapeFunction
protected:
virtual ~AppCurrentWindowInternalSetShapeFunction() {}
- virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
+ virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
};
class AppCurrentWindowInternalSetAlwaysOnTopFunction
protected:
virtual ~AppCurrentWindowInternalSetAlwaysOnTopFunction() {}
- virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
+ virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
};
} // namespace extensions