blob: d0e7d4aa28f2a4be6fd317891cfe4afde7c18155 [file] [log] [blame]
[email protected]81585f32011-07-29 19:32:061// Copyright (c) 2011 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef AURA_DESKTOP_HOST_H_
6#define AURA_DESKTOP_HOST_H_
7#pragma once
8
9#include "ui/gfx/native_widget_types.h"
10
11namespace gfx {
12class Rect;
13class Size;
14}
15
16namespace aura {
17
18class Desktop;
19
20// DesktopHost bridges between a native window and the embedded Desktop. It
21// provides the accelerated widget and maps events from the native os to aura.
22class DesktopHost {
23 public:
24 virtual ~DesktopHost() {}
25
26 // Creates a new DesktopHost. The caller owns the returned value.
27 static DesktopHost* Create(const gfx::Rect& bounds);
28
29 // Sets the Desktop this DesktopHost is hosting. DesktopHost does not own the
30 // Desktop.
31 virtual void SetDesktop(Desktop* desktop) = 0;
32
33 // Returns the accelerated widget.
34 virtual gfx::AcceleratedWidget GetAcceleratedWidget() = 0;
35
36 // Shows the DesktopHost.
37 virtual void Show() = 0;
38
39 // Returns the size of the DesktopHost.
40 virtual gfx::Size GetSize() = 0;
41};
42
43} // namespace aura
44
45#endif // AURA_DESKTOP_HOST_H_