1 // Copyright 2014 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.
5 #ifndef CHROME_BROWSER_UI_VIEWS_APPS_GLASS_APP_WINDOW_FRAME_VIEW_WIN_H_
6 #define CHROME_BROWSER_UI_VIEWS_APPS_GLASS_APP_WINDOW_FRAME_VIEW_WIN_H_
8 #include "ui/gfx/geometry/insets.h"
9 #include "ui/views/window/non_client_view.h"
11 namespace extensions
{
12 class NativeAppWindow
;
15 // A glass style app window frame view.
16 class GlassAppWindowFrameViewWin
: public views::NonClientFrameView
{
18 static const char kViewClassName
[];
20 explicit GlassAppWindowFrameViewWin(extensions::NativeAppWindow
* window
,
21 views::Widget
* widget
);
22 ~GlassAppWindowFrameViewWin() override
;
24 gfx::Insets
GetGlassInsets() const;
27 // views::NonClientFrameView implementation.
28 gfx::Rect
GetBoundsForClientView() const override
;
29 gfx::Rect
GetWindowBoundsForClientBounds(
30 const gfx::Rect
& client_bounds
) const override
;
31 int NonClientHitTest(const gfx::Point
& point
) override
;
32 void GetWindowMask(const gfx::Size
& size
, gfx::Path
* window_mask
) override
;
33 void ResetWindowControls() override
{}
34 void UpdateWindowIcon() override
{}
35 void UpdateWindowTitle() override
{}
36 void SizeConstraintsChanged() override
{}
38 // views::View implementation.
39 gfx::Size
GetPreferredSize() const override
;
40 const char* GetClassName() const override
;
41 gfx::Size
GetMinimumSize() const override
;
42 gfx::Size
GetMaximumSize() const override
;
44 extensions::NativeAppWindow
* window_
;
45 views::Widget
* widget_
;
47 DISALLOW_COPY_AND_ASSIGN(GlassAppWindowFrameViewWin
);
50 #endif // CHROME_BROWSER_UI_VIEWS_APPS_GLASS_APP_WINDOW_FRAME_VIEW_WIN_H_