#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;
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
APP_CURRENTWINDOWINTERNAL_SETMINWIDTH)
protected:
virtual ~AppCurrentWindowInternalSetMinWidthFunction() {}
- virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
+ virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
};
class AppCurrentWindowInternalSetMinHeightFunction
APP_CURRENTWINDOWINTERNAL_SETMINHEIGHT)
protected:
virtual ~AppCurrentWindowInternalSetMinHeightFunction() {}
- virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
+ virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
};
class AppCurrentWindowInternalSetMaxWidthFunction
APP_CURRENTWINDOWINTERNAL_SETMAXWIDTH)
protected:
virtual ~AppCurrentWindowInternalSetMaxWidthFunction() {}
- virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
+ virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
};
class AppCurrentWindowInternalSetMaxHeightFunction
APP_CURRENTWINDOWINTERNAL_SETMAXHEIGHT)
protected:
virtual ~AppCurrentWindowInternalSetMaxHeightFunction() {}
- virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
+ virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
};
class AppCurrentWindowInternalSetIconFunction
protected:
virtual ~AppCurrentWindowInternalSetIconFunction() {}
- virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
+ virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
+};
+
+class AppCurrentWindowInternalSetBadgeIconFunction
+ : public AppCurrentWindowInternalExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.setBadgeIcon",
+ APP_CURRENTWINDOWINTERNAL_SETBADGEICON)
+
+ protected:
+ virtual ~AppCurrentWindowInternalSetBadgeIconFunction() {}
+ virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
+};
+
+class AppCurrentWindowInternalClearBadgeFunction
+ : public AppCurrentWindowInternalExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.clearBadge",
+ APP_CURRENTWINDOWINTERNAL_CLEARBADGE)
+
+ protected:
+ 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