| 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/property_util.h" | 10 #include "ash/wm/property_util.h" |
| (...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 784 return (hit_code == HTBOTTOMRIGHT || | 784 return (hit_code == HTBOTTOMRIGHT || |
| 785 hit_code == HTBOTTOM || | 785 hit_code == HTBOTTOM || |
| 786 hit_code == HTBOTTOMLEFT) ? HTBOTTOM : HTNOWHERE; | 786 hit_code == HTBOTTOMLEFT) ? HTBOTTOM : HTNOWHERE; |
| 787 } | 787 } |
| 788 } | 788 } |
| 789 return hit_code; | 789 return hit_code; |
| 790 } | 790 } |
| 791 | 791 |
| 792 bool FramePainter::UseSoloWindowHeader() { | 792 bool FramePainter::UseSoloWindowHeader() { |
| 793 aura::RootWindow* root = window_->GetRootWindow(); | 793 aura::RootWindow* root = window_->GetRootWindow(); |
| 794 if (!root) | 794 if (!root || root->GetProperty(internal::kIgnoreSoloWindowPolicy)) |
| 795 return false; | 795 return false; |
| 796 | |
| 797 return (root->GetProperty(internal::kSoloWindowFramePainterKey) == this); | 796 return (root->GetProperty(internal::kSoloWindowFramePainterKey) == this); |
| 798 } | 797 } |
| 799 | 798 |
| 800 // static | 799 // static |
| 801 FramePainter* FramePainter::GetSoloPainterInRoot(RootWindow* root_window, | 800 FramePainter* FramePainter::GetSoloPainterInRoot(RootWindow* root_window, |
| 802 Window* ignorable_window) { | 801 Window* ignorable_window) { |
| 803 // Can be NULL in tests that don't use FramePainter windows. | 802 // Can be NULL in tests that don't use FramePainter windows. |
| 804 if (!instances_) | 803 if (!instances_) |
| 805 return NULL; | 804 return NULL; |
| 806 | 805 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 874 int title_y = | 873 int title_y = |
| 875 (view->GetBoundsForClientView().y() - title_font.GetHeight()) / 2; | 874 (view->GetBoundsForClientView().y() - title_font.GetHeight()) / 2; |
| 876 return gfx::Rect( | 875 return gfx::Rect( |
| 877 title_x, | 876 title_x, |
| 878 std::max(0, title_y), | 877 std::max(0, title_y), |
| 879 std::max(0, size_button_->x() - kTitleLogoSpacing - title_x), | 878 std::max(0, size_button_->x() - kTitleLogoSpacing - title_x), |
| 880 title_font.GetHeight()); | 879 title_font.GetHeight()); |
| 881 } | 880 } |
| 882 | 881 |
| 883 } // namespace ash | 882 } // namespace ash |
| OLD | NEW |