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. 4 5#ifndef CHROME_BROWSER_UI_VIEWS_APPS_APP_WINDOW_DESKTOP_WINDOW_TREE_HOST_WIN_H_ 6#define CHROME_BROWSER_UI_VIEWS_APPS_APP_WINDOW_DESKTOP_WINDOW_TREE_HOST_WIN_H_ 7 8#include "ui/views/widget/desktop_aura/desktop_window_tree_host_win.h" 9 10namespace views { 11class DesktopNativeWidgetAura; 12} 13 14class ChromeNativeAppWindowViewsWin; 15 16// AppWindowDesktopWindowTreeHostWin handles updating the glass of app frames on 17// Windows. It is used for all desktop app windows on Windows, but is only 18// actively doing anything when a glass window frame is being used. 19class AppWindowDesktopWindowTreeHostWin 20 : public views::DesktopWindowTreeHostWin { 21 public: 22 AppWindowDesktopWindowTreeHostWin( 23 ChromeNativeAppWindowViewsWin* app_window, 24 views::DesktopNativeWidgetAura* desktop_native_widget_aura); 25 virtual ~AppWindowDesktopWindowTreeHostWin(); 26 27 private: 28 // Overridden from DesktopWindowTreeHostWin: 29 virtual bool GetClientAreaInsets(gfx::Insets* insets) const OVERRIDE; 30 virtual void HandleFrameChanged() OVERRIDE; 31 virtual void PostHandleMSG(UINT message, 32 WPARAM w_param, 33 LPARAM l_param) OVERRIDE; 34 35 // Updates the glass frame area by calling the DwmExtendFrameIntoClientArea 36 // Windows function. 37 void UpdateDWMFrame(); 38 39 ChromeNativeAppWindowViewsWin* app_window_; 40 41 DISALLOW_COPY_AND_ASSIGN(AppWindowDesktopWindowTreeHostWin); 42}; 43 44#endif // CHROME_BROWSER_UI_VIEWS_APPS_APP_WINDOW_DESKTOP_WINDOW_TREE_HOST_WIN_H_ 45