Updating XTBs based on .GRDs from branch master
[chromium-blink-merge.git] / ash / wm / panels / panel_frame_view.h
blobf4ba33be8475ac57aafa7dadb1f9e1473a57254e
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_PANELS_PANEL_FRAME_VIEW_H_
6 #define ASH_WM_PANELS_PANEL_FRAME_VIEW_H_
8 #include "ash/ash_export.h"
9 #include "base/basictypes.h"
10 #include "ui/views/window/non_client_view.h"
12 namespace views {
13 class ImageView;
16 namespace ash {
17 class DefaultHeaderPainter;
18 class FrameCaptionButtonContainerView;
19 class FrameBorderHitTestController;
21 class ASH_EXPORT PanelFrameView : public views::NonClientFrameView {
22 public:
23 // Internal class name.
24 static const char kViewClassName[];
26 enum FrameType {
27 FRAME_NONE,
28 FRAME_ASH
31 PanelFrameView(views::Widget* frame, FrameType frame_type);
32 ~PanelFrameView() override;
34 // Overridden from views::View:
35 const char* GetClassName() const override;
37 private:
38 void InitHeaderPainter();
40 // Height from top of window to top of client area.
41 int NonClientTopBorderHeight() const;
43 // Overridden from views::NonClientFrameView:
44 gfx::Rect GetBoundsForClientView() const override;
45 gfx::Rect GetWindowBoundsForClientBounds(
46 const gfx::Rect& client_bounds) const override;
47 int NonClientHitTest(const gfx::Point& point) override;
48 void GetWindowMask(const gfx::Size& size, gfx::Path* window_mask) override;
49 void ResetWindowControls() override;
50 void UpdateWindowIcon() override;
51 void UpdateWindowTitle() override;
52 void SizeConstraintsChanged() override;
54 // Overridden from views::View:
55 gfx::Size GetMinimumSize() const override;
56 void Layout() override;
57 void OnPaint(gfx::Canvas* canvas) override;
59 // Child View class describing the panel's title bar behavior
60 // and buttons, owned by the view hierarchy
61 views::Widget* frame_;
62 FrameCaptionButtonContainerView* caption_button_container_;
63 views::ImageView* window_icon_;
64 gfx::Rect client_view_bounds_;
66 // Helper class for painting the header.
67 scoped_ptr<DefaultHeaderPainter> header_painter_;
69 // Updates the hittest bounds overrides based on the window state type.
70 scoped_ptr<FrameBorderHitTestController> frame_border_hit_test_controller_;
72 DISALLOW_COPY_AND_ASSIGN(PanelFrameView);
77 #endif // ASH_WM_PANELS_PANEL_FRAME_VIEW_H_