1 // Copyright 2015 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_EXTENSIONS_API_TABS_APP_BASE_WINDOW_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_TABS_APP_BASE_WINDOW_H_
10 #include "base/basictypes.h"
11 #include "ui/base/base_window.h"
13 namespace extensions
{
16 class NativeAppWindow
;
18 // A custom ui::BaseWindow to be given to a WindowController. It
19 // allows us to constrain some operations on application windows (like
21 class AppBaseWindow
: public ui::BaseWindow
{
23 explicit AppBaseWindow(AppWindow
* app_window
);
24 virtual ~AppBaseWindow();
28 bool IsActive() const override
;
29 bool IsMaximized() const override
;
30 bool IsMinimized() const override
;
31 bool IsFullscreen() const override
;
32 gfx::NativeWindow
GetNativeWindow() const override
;
33 gfx::Rect
GetRestoredBounds() const override
;
34 ui::WindowShowState
GetRestoredState() const override
;
35 gfx::Rect
GetBounds() const override
;
38 void ShowInactive() override
;
39 void Close() override
;
40 void Activate() override
;
41 void Deactivate() override
;
42 void Maximize() override
;
43 void Minimize() override
;
44 void Restore() override
;
45 void SetBounds(const gfx::Rect
& bounds
) override
;
46 void FlashFrame(bool flash
) override
;
47 bool IsAlwaysOnTop() const override
;
48 void SetAlwaysOnTop(bool always_on_top
) override
;
50 NativeAppWindow
* GetBaseWindow() const;
52 AppWindow
* app_window_
;
54 DISALLOW_COPY_AND_ASSIGN(AppBaseWindow
);
57 } // namespace extensions
59 #endif // CHROME_BROWSER_EXTENSIONS_API_TABS_APP_BASE_WINDOW_H_