blob: 1eb89ca4f8a7a2eaedc3a452ae7aa04a20e33ac0 [file] [log] [blame]
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#pragma once
#include "aura/window.h"
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "ui/gfx/native_widget_types.h"
namespace gfx {
class Size;
namespace ui {
class Compositor;
namespace aura {
class MouseEvent;
class Window;
// Desktop is responsible for hosting a set of windows.
class Desktop {
Desktop(gfx::AcceleratedWidget widget, const gfx::Size& size);
// Draws the necessary set of windows.
void Draw();
// Handles a mouse event. Returns true if handled.
bool OnMouseEvent(const MouseEvent& event);
// Compositor we're drawing to.
ui::Compositor* compositor() { return compositor_.get(); }
Window* window() { return window_.get(); }
scoped_refptr<ui::Compositor> compositor_;
scoped_ptr<Window> window_;
} // namespace aura
#endif // AURA_DESKTOP_H_