Mailbox support for texture layers.
[chromium-blink-merge.git] / ash / wm / panel_frame_view.h
blob248eec5406c37d3d27f7f18cc3f29dd1f66943d2
1 // Copyright (c) 2012 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 ASH_WM_PANEL_FRAME_VIEW_H_
6 #define ASH_WM_PANEL_FRAME_VIEW_H_
8 #include "ash/ash_export.h"
9 #include "base/basictypes.h"
10 #include "ui/aura/aura_export.h"
11 #include "ui/views/window/non_client_view.h"
12 #include "ui/views/controls/button/button.h" // ButtonListener
14 namespace views {
15 class ImageButton;
18 namespace ash {
20 class FramePainter;
22 class ASH_EXPORT PanelFrameView : public views::NonClientFrameView,
23 public views::ButtonListener {
24 public:
25 enum FrameType {
26 FRAME_NONE,
27 FRAME_ASH
30 PanelFrameView(views::Widget* frame, FrameType frame_type);
31 virtual ~PanelFrameView();
33 private:
34 void InitFramePainter(views::Widget* frame);
36 // Overridden from views::NonClientFrameView:
37 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE;
38 virtual gfx::Rect GetWindowBoundsForClientBounds(
39 const gfx::Rect& client_bounds) const OVERRIDE;
40 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE;
41 virtual void GetWindowMask(const gfx::Size& size,
42 gfx::Path* window_mask) OVERRIDE;
43 virtual void ResetWindowControls() OVERRIDE;
44 virtual void UpdateWindowIcon() OVERRIDE;
45 virtual void UpdateWindowTitle() OVERRIDE;
47 // Overridden from views::View:
48 virtual void Layout() OVERRIDE;
49 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
51 // Overridden from views::ButtonListener:
52 virtual void ButtonPressed(views::Button* sender,
53 const ui::Event& event) OVERRIDE;
55 // Child View class describing the panel's title bar behavior
56 // and buttons, owned by the view hierarchy
57 scoped_ptr<FramePainter> frame_painter_;
58 views::ImageButton* close_button_;
59 views::ImageButton* minimize_button_;
60 gfx::Rect client_view_bounds_;
62 DISALLOW_COPY_AND_ASSIGN(PanelFrameView);
67 #endif // ASH_WM_PANEL_FRAME_VIEW_H_