OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this |
2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
3 // LICENSE file. | 3 // LICENSE file. |
4 | 4 |
5 #include "chrome/browser/views/blocked_popup_container_view_views.h" | 5 #include "chrome/browser/views/blocked_popup_container_view_views.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 #if defined(OS_WIN) | 8 #if defined(OS_WIN) |
9 #include <windows.h> | 9 #include <windows.h> |
10 #endif | 10 #endif |
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
563 SetPosition(); | 563 SetPosition(); |
564 } | 564 } |
565 | 565 |
566 void BlockedPopupContainerViewViews::UpdateWidgetShape( | 566 void BlockedPopupContainerViewViews::UpdateWidgetShape( |
567 BlockedPopupContainerViewWidget* widget, const gfx::Size& size) { | 567 BlockedPopupContainerViewWidget* widget, const gfx::Size& size) { |
568 // Set the shape so we have rounded corners on the top. | 568 // Set the shape so we have rounded corners on the top. |
569 SkRect rect; | 569 SkRect rect; |
570 rect.set(0, 0, SkIntToScalar(size.width()), SkIntToScalar(size.height())); | 570 rect.set(0, 0, SkIntToScalar(size.width()), SkIntToScalar(size.height())); |
571 gfx::Path path; | 571 gfx::Path path; |
572 path.addRoundRect(rect, kRoundedCornerRad, SkPath::kCW_Direction); | 572 path.addRoundRect(rect, kRoundedCornerRad, SkPath::kCW_Direction); |
573 widget->SetShape(path); | 573 widget->SetShape(path.CreateNativeRegion()); |
574 } | 574 } |
OLD | NEW |