15c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu// Copyright 2014 The Chromium Authors. All rights reserved.
25c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu// Use of this source code is governed by a BSD-style license that can be
35c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu// found in the LICENSE file.
45c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu
55c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu#ifndef CHROME_BROWSER_UI_VIEWS_APPS_GLASS_APP_WINDOW_FRAME_VIEW_WIN_H_
65c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu#define CHROME_BROWSER_UI_VIEWS_APPS_GLASS_APP_WINDOW_FRAME_VIEW_WIN_H_
75c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu
85c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu#include "ui/gfx/geometry/insets.h"
95c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu#include "ui/views/window/non_client_view.h"
105c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu
1103b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)namespace extensions {
125c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liuclass NativeAppWindow;
135c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu}
145c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu
155c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu// A glass style app window frame view.
165c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liuclass GlassAppWindowFrameViewWin : public views::NonClientFrameView {
175c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu public:
185c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu  static const char kViewClassName[];
195c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu
2003b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)  explicit GlassAppWindowFrameViewWin(extensions::NativeAppWindow* window,
215c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu                                      views::Widget* widget);
225c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu  virtual ~GlassAppWindowFrameViewWin();
235c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu
245c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu  gfx::Insets GetGlassInsets() const;
255c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu
265c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu private:
275c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu  // views::NonClientFrameView implementation.
285c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu  virtual gfx::Rect GetBoundsForClientView() const OVERRIDE;
295c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu  virtual gfx::Rect GetWindowBoundsForClientBounds(
305c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu      const gfx::Rect& client_bounds) const OVERRIDE;
315c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu  virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE;
325c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu  virtual void GetWindowMask(const gfx::Size& size,
335c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu                             gfx::Path* window_mask) OVERRIDE;
345c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu  virtual void ResetWindowControls() OVERRIDE {}
355c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu  virtual void UpdateWindowIcon() OVERRIDE {}
365c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu  virtual void UpdateWindowTitle() OVERRIDE {}
371320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci  virtual void SizeConstraintsChanged() OVERRIDE {}
385c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu
395c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu  // views::View implementation.
40cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)  virtual gfx::Size GetPreferredSize() const OVERRIDE;
415c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu  virtual const char* GetClassName() const OVERRIDE;
42cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)  virtual gfx::Size GetMinimumSize() const OVERRIDE;
43cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)  virtual gfx::Size GetMaximumSize() const OVERRIDE;
445c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu
4503b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)  extensions::NativeAppWindow* window_;
465c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu  views::Widget* widget_;
475c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu
485c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu  DISALLOW_COPY_AND_ASSIGN(GlassAppWindowFrameViewWin);
495c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu};
505c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu
515c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu#endif  // CHROME_BROWSER_UI_VIEWS_APPS_GLASS_APP_WINDOW_FRAME_VIEW_WIN_H_
52