OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ASH_WM_PANEL_FRAME_VIEW_H_ | 5 #ifndef ASH_WM_PANEL_FRAME_VIEW_H_ |
6 #define ASH_WM_PANEL_FRAME_VIEW_H_ | 6 #define ASH_WM_PANEL_FRAME_VIEW_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "ui/aura/aura_export.h" | 10 #include "ui/aura/aura_export.h" |
11 #include "ui/views/window/non_client_view.h" | 11 #include "ui/views/window/non_client_view.h" |
12 #include "ui/views/controls/button/button.h" // ButtonListener | 12 #include "ui/views/controls/button/button.h" // ButtonListener |
13 | 13 |
14 namespace views { | 14 namespace views { |
15 class ImageButton; | 15 class ImageButton; |
16 } | 16 } |
17 | 17 |
18 namespace ash { | 18 namespace ash { |
19 | 19 |
20 class FramePainter; | 20 class FramePainter; |
21 | 21 |
22 class ASH_EXPORT PanelFrameView : public views::NonClientFrameView, | 22 class ASH_EXPORT PanelFrameView : public views::NonClientFrameView, |
23 public views::ButtonListener { | 23 public views::ButtonListener { |
24 public: | 24 public: |
25 explicit PanelFrameView(views::Widget* frame); | 25 enum FrameType { |
| 26 FRAME_NONE, |
| 27 FRAME_ASH |
| 28 }; |
| 29 |
| 30 PanelFrameView(views::Widget* frame, FrameType frame_type); |
26 virtual ~PanelFrameView(); | 31 virtual ~PanelFrameView(); |
27 | 32 |
28 private: | 33 private: |
| 34 void InitFramePainter(views::Widget* frame); |
| 35 |
29 // Overridden from views::NonClientFrameView: | 36 // Overridden from views::NonClientFrameView: |
30 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE; | 37 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE; |
31 virtual gfx::Rect GetWindowBoundsForClientBounds( | 38 virtual gfx::Rect GetWindowBoundsForClientBounds( |
32 const gfx::Rect& client_bounds) const OVERRIDE; | 39 const gfx::Rect& client_bounds) const OVERRIDE; |
33 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE; | 40 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE; |
34 virtual void GetWindowMask(const gfx::Size& size, | 41 virtual void GetWindowMask(const gfx::Size& size, |
35 gfx::Path* window_mask) OVERRIDE; | 42 gfx::Path* window_mask) OVERRIDE; |
36 virtual void ResetWindowControls() OVERRIDE; | 43 virtual void ResetWindowControls() OVERRIDE; |
37 virtual void UpdateWindowIcon() OVERRIDE; | 44 virtual void UpdateWindowIcon() OVERRIDE; |
38 virtual void UpdateWindowTitle() OVERRIDE; | 45 virtual void UpdateWindowTitle() OVERRIDE; |
(...skipping 12 matching lines...) Expand all Loading... |
51 views::ImageButton* close_button_; | 58 views::ImageButton* close_button_; |
52 views::ImageButton* minimize_button_; | 59 views::ImageButton* minimize_button_; |
53 gfx::Rect client_view_bounds_; | 60 gfx::Rect client_view_bounds_; |
54 | 61 |
55 DISALLOW_COPY_AND_ASSIGN(PanelFrameView); | 62 DISALLOW_COPY_AND_ASSIGN(PanelFrameView); |
56 }; | 63 }; |
57 | 64 |
58 } | 65 } |
59 | 66 |
60 #endif // ASH_WM_PANEL_FRAME_VIEW_H_ | 67 #endif // ASH_WM_PANEL_FRAME_VIEW_H_ |
OLD | NEW |