summaryrefslogtreecommitdiffstats
path: root/aura/desktop.h
diff options
context:
space:
mode:
Diffstat (limited to 'aura/desktop.h')
-rw-r--r--aura/desktop.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/aura/desktop.h b/aura/desktop.h
index 3d292af..4440842 100644
--- a/aura/desktop.h
+++ b/aura/desktop.h
@@ -10,23 +10,21 @@
#include "aura/aura_export.h"
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
+#include "base/task.h"
+#include "ui/gfx/compositor/compositor.h"
#include "ui/gfx/native_widget_types.h"
namespace gfx {
class Size;
}
-namespace ui {
-class Compositor;
-}
-
namespace aura {
class DesktopHost;
class MouseEvent;
// Desktop is responsible for hosting a set of windows.
-class AURA_EXPORT Desktop {
+class AURA_EXPORT Desktop : public ui::CompositorDelegate {
public:
Desktop();
~Desktop();
@@ -57,6 +55,9 @@ class AURA_EXPORT Desktop {
static Desktop* GetInstance();
private:
+ // Overridden from ui::CompositorDelegate
+ virtual void ScheduleCompositorPaint();
+
scoped_refptr<ui::Compositor> compositor_;
scoped_ptr<internal::RootWindow> window_;
@@ -65,6 +66,9 @@ class AURA_EXPORT Desktop {
static Desktop* instance_;
+ // Used to schedule painting.
+ ScopedRunnableMethodFactory<Desktop> schedule_paint_;
+
DISALLOW_COPY_AND_ASSIGN(Desktop);
};