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 <vector> | 7 #include <vector> |
8 | 8 |
9 #include "ash/ash_constants.h" | 9 #include "ash/ash_constants.h" |
10 #include "ash/root_window_controller.h" | 10 #include "ash/root_window_controller.h" |
11 #include "ash/root_window_settings.h" | 11 #include "ash/root_window_settings.h" |
12 #include "ash/shell.h" | 12 #include "ash/shell.h" |
13 #include "ash/shell_window_ids.h" | 13 #include "ash/shell_window_ids.h" |
| 14 #include "ash/wm/caption_buttons/frame_caption_button_container_view.h" |
14 #include "ash/wm/property_util.h" | 15 #include "ash/wm/property_util.h" |
15 #include "ash/wm/window_settings.h" | 16 #include "ash/wm/window_settings.h" |
16 #include "ash/wm/window_util.h" | 17 #include "ash/wm/window_util.h" |
17 #include "ash/wm/workspace/frame_caption_button_container_view.h" | |
18 #include "base/logging.h" // DCHECK | 18 #include "base/logging.h" // DCHECK |
19 #include "grit/ash_resources.h" | 19 #include "grit/ash_resources.h" |
20 #include "third_party/skia/include/core/SkCanvas.h" | 20 #include "third_party/skia/include/core/SkCanvas.h" |
21 #include "third_party/skia/include/core/SkColor.h" | 21 #include "third_party/skia/include/core/SkColor.h" |
22 #include "third_party/skia/include/core/SkPaint.h" | 22 #include "third_party/skia/include/core/SkPaint.h" |
23 #include "third_party/skia/include/core/SkPath.h" | 23 #include "third_party/skia/include/core/SkPath.h" |
24 #include "ui/aura/client/aura_constants.h" | 24 #include "ui/aura/client/aura_constants.h" |
25 #include "ui/aura/env.h" | 25 #include "ui/aura/env.h" |
26 #include "ui/aura/root_window.h" | 26 #include "ui/aura/root_window.h" |
27 #include "ui/aura/window.h" | 27 #include "ui/aura/window.h" |
(...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
841 // icon. Don't use |window_icon_| for this computation as it may be NULL. | 841 // icon. Don't use |window_icon_| for this computation as it may be NULL. |
842 int title_y = GetCaptionButtonContainerCenterY() - title_font.GetHeight() / 2; | 842 int title_y = GetCaptionButtonContainerCenterY() - title_font.GetHeight() / 2; |
843 return gfx::Rect( | 843 return gfx::Rect( |
844 title_x, | 844 title_x, |
845 std::max(0, title_y), | 845 std::max(0, title_y), |
846 std::max(0, caption_button_container_->x() - kTitleLogoSpacing - title_x), | 846 std::max(0, caption_button_container_->x() - kTitleLogoSpacing - title_x), |
847 title_font.GetHeight()); | 847 title_font.GetHeight()); |
848 } | 848 } |
849 | 849 |
850 } // namespace ash | 850 } // namespace ash |
OLD | NEW |