| 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_FRAME_PAINTER_H_ | 5 #ifndef ASH_WM_FRAME_PAINTER_H_ |
| 6 #define ASH_WM_FRAME_PAINTER_H_ | 6 #define ASH_WM_FRAME_PAINTER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "ash/ash_export.h" | 9 #include "ash/ash_export.h" |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 class Widget; | 24 class Widget; |
| 25 } | 25 } |
| 26 | 26 |
| 27 namespace ash { | 27 namespace ash { |
| 28 | 28 |
| 29 // Helper class for painting window frames. Exists to share code between | 29 // Helper class for painting window frames. Exists to share code between |
| 30 // various implementations of views::NonClientFrameView. Canonical source of | 30 // various implementations of views::NonClientFrameView. Canonical source of |
| 31 // layout constants for Ash window frames. | 31 // layout constants for Ash window frames. |
| 32 class ASH_EXPORT FramePainter { | 32 class ASH_EXPORT FramePainter { |
| 33 public: | 33 public: |
| 34 // Ash windows do not have a traditional visible window frame. Window content |
| 35 // extends to the edge of the window. We consider a small region outside the |
| 36 // window bounds and an even smaller region overlapping the window to be the |
| 37 // "non-client" area and use it for resizing. |
| 38 static const int kResizeOutsideBoundsSize; |
| 39 static const int kResizeInsideBoundsSize; |
| 40 |
| 34 FramePainter(); | 41 FramePainter(); |
| 35 ~FramePainter(); | 42 ~FramePainter(); |
| 36 | 43 |
| 37 // |frame| and buttons are used for layout and are not owned. | 44 // |frame| and buttons are used for layout and are not owned. |
| 38 void Init(views::Widget* frame, | 45 void Init(views::Widget* frame, |
| 39 views::View* window_icon, | 46 views::View* window_icon, |
| 40 views::ImageButton* maximize_button, | 47 views::ImageButton* maximize_button, |
| 41 views::ImageButton* close_button); | 48 views::ImageButton* close_button); |
| 42 | 49 |
| 43 // Helpers for views::NonClientFrameView implementations. | 50 // Helpers for views::NonClientFrameView implementations. |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 const SkBitmap* top_right_corner_; | 104 const SkBitmap* top_right_corner_; |
| 98 const SkBitmap* header_left_edge_; | 105 const SkBitmap* header_left_edge_; |
| 99 const SkBitmap* header_right_edge_; | 106 const SkBitmap* header_right_edge_; |
| 100 | 107 |
| 101 DISALLOW_COPY_AND_ASSIGN(FramePainter); | 108 DISALLOW_COPY_AND_ASSIGN(FramePainter); |
| 102 }; | 109 }; |
| 103 | 110 |
| 104 } // namespace ash | 111 } // namespace ash |
| 105 | 112 |
| 106 #endif // ASH_WM_FRAME_PAINTER_H_ | 113 #endif // ASH_WM_FRAME_PAINTER_H_ |
| OLD | NEW |