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 #include "ash/wm/frame_painter.h" | 5 #include "ash/wm/frame_painter.h" |
6 | 6 |
7 #include "ash/ash_constants.h" | 7 #include "ash/ash_constants.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
10 #include "ash/wm/window_util.h" | 10 #include "ash/wm/window_util.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 #include "ui/gfx/font.h" | 26 #include "ui/gfx/font.h" |
27 #include "ui/gfx/image/image.h" | 27 #include "ui/gfx/image/image.h" |
28 #include "ui/views/controls/button/image_button.h" | 28 #include "ui/views/controls/button/image_button.h" |
29 #include "ui/views/widget/widget.h" | 29 #include "ui/views/widget/widget.h" |
30 #include "ui/views/widget/widget_delegate.h" | 30 #include "ui/views/widget/widget_delegate.h" |
31 | 31 |
32 namespace { | 32 namespace { |
33 // TODO(jamescook): Border is specified to be a single pixel overlapping | 33 // TODO(jamescook): Border is specified to be a single pixel overlapping |
34 // the web content and may need to be built into the shadow layers instead. | 34 // the web content and may need to be built into the shadow layers instead. |
35 const int kBorderThickness = 0; | 35 const int kBorderThickness = 0; |
36 // In the window corners, the resize areas don't actually expand bigger, but the | |
37 // 16 px at the end of each edge triggers diagonal resizing. | |
38 const int kResizeAreaCornerSize = 16; | |
39 // Ash windows do not have a traditional visible window frame. Window content | |
40 // extends to the edge of the window. We consider a small region outside the | |
41 // window bounds and an even smaller region overlapping the window to be the | |
42 // "non-client" area and use it for resizing. | |
43 const int kResizeOutsideBoundsSizeTouch = 30; | |
44 const int kResizeOutsideBoundsSize = 6; | |
45 const int kResizeInsideBoundsSize = 1; | |
46 // Space between left edge of window and popup window icon. | 36 // Space between left edge of window and popup window icon. |
47 const int kIconOffsetX = 4; | 37 const int kIconOffsetX = 4; |
48 // Space between top of window and popup window icon. | 38 // Space between top of window and popup window icon. |
49 const int kIconOffsetY = 6; | 39 const int kIconOffsetY = 6; |
50 // Height and width of window icon. | 40 // Height and width of window icon. |
51 const int kIconSize = 16; | 41 const int kIconSize = 16; |
52 // Space between the title text and the caption buttons. | 42 // Space between the title text and the caption buttons. |
53 const int kTitleLogoSpacing = 5; | 43 const int kTitleLogoSpacing = 5; |
54 // Space between window icon and title text. | 44 // Space between window icon and title text. |
55 const int kTitleIconOffsetX = 4; | 45 const int kTitleIconOffsetX = 4; |
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
625 for (std::set<FramePainter*>::const_iterator it = instances_->begin(); | 615 for (std::set<FramePainter*>::const_iterator it = instances_->begin(); |
626 it != instances_->end(); | 616 it != instances_->end(); |
627 ++it) { | 617 ++it) { |
628 FramePainter* painter = *it; | 618 FramePainter* painter = *it; |
629 if (IsVisibleNormalWindow(painter->window_)) | 619 if (IsVisibleNormalWindow(painter->window_)) |
630 painter->frame_->non_client_view()->SchedulePaint(); | 620 painter->frame_->non_client_view()->SchedulePaint(); |
631 } | 621 } |
632 } | 622 } |
633 | 623 |
634 } // namespace ash | 624 } // namespace ash |
OLD | NEW |