summaryrefslogtreecommitdiffstats
path: root/aura/desktop_host_win.h
blob: 9513a37676d32e57d34c7c56307a94c088c8aa87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// 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.

#ifndef AURA_DESKTOP_HOST_WIN_H_
#define AURA_DESKTOP_HOST_WIN_H_
#pragma once

#include "aura/desktop_host.h"
#include "base/compiler_specific.h"
#include "ui/base/win/window_impl.h"

namespace aura {

class DesktopHostWin : public DesktopHost, public ui::WindowImpl {
 public:
  DesktopHostWin(const gfx::Rect& bounds);
  virtual ~DesktopHostWin();

  // DesktopHost:
  virtual void SetDesktop(Desktop* desktop) OVERRIDE;
  virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
  virtual void Show() OVERRIDE;
  virtual gfx::Size GetSize() OVERRIDE;

 private:
  BEGIN_MSG_MAP_EX(DesktopHostWin)
    MSG_WM_CLOSE(OnClose)
    MSG_WM_PAINT(OnPaint)
  END_MSG_MAP()

  void OnClose();
  void OnPaint(HDC dc);

  Desktop* desktop_;

  DISALLOW_COPY_AND_ASSIGN(DesktopHostWin);
};

}  // namespace aura

#endif  // AURA_DESKTOP_HOST_WIN_H_