| 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 |
| 11 | 11 |
| 12 #include "app/gfx/canvas.h" | 12 #include "app/gfx/canvas.h" |
| 13 #include "app/gfx/path.h" | 13 #include "app/gfx/path.h" |
| 14 #include "app/l10n_util.h" | 14 #include "app/l10n_util.h" |
| 15 #include "app/menus/simple_menu_model.h" | 15 #include "app/menus/simple_menu_model.h" |
| 16 #include "app/resource_bundle.h" | 16 #include "app/resource_bundle.h" |
| 17 #include "app/slide_animation.h" | 17 #include "app/slide_animation.h" |
| 18 #include "base/string_util.h" | |
| 19 #include "base/utf_string_conversions.h" | 18 #include "base/utf_string_conversions.h" |
| 20 #include "chrome/browser/profile.h" | 19 #include "chrome/browser/profile.h" |
| 21 #include "chrome/browser/tab_contents/tab_contents.h" | 20 #include "chrome/browser/tab_contents/tab_contents.h" |
| 22 #include "grit/generated_resources.h" | 21 #include "grit/generated_resources.h" |
| 23 #include "grit/theme_resources.h" | 22 #include "grit/theme_resources.h" |
| 24 #include "views/background.h" | 23 #include "views/background.h" |
| 25 #include "views/controls/button/image_button.h" | 24 #include "views/controls/button/image_button.h" |
| 26 #include "views/controls/button/menu_button.h" | 25 #include "views/controls/button/menu_button.h" |
| 27 #include "views/controls/menu/menu_2.h" | 26 #include "views/controls/menu/menu_2.h" |
| 28 #include "views/controls/scrollbar/native_scroll_bar.h" | 27 #include "views/controls/scrollbar/native_scroll_bar.h" |
| (...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 | 564 |
| 566 void BlockedPopupContainerViewViews::UpdateWidgetShape( | 565 void BlockedPopupContainerViewViews::UpdateWidgetShape( |
| 567 BlockedPopupContainerViewWidget* widget, const gfx::Size& size) { | 566 BlockedPopupContainerViewWidget* widget, const gfx::Size& size) { |
| 568 // Set the shape so we have rounded corners on the top. | 567 // Set the shape so we have rounded corners on the top. |
| 569 SkRect rect; | 568 SkRect rect; |
| 570 rect.set(0, 0, SkIntToScalar(size.width()), SkIntToScalar(size.height())); | 569 rect.set(0, 0, SkIntToScalar(size.width()), SkIntToScalar(size.height())); |
| 571 gfx::Path path; | 570 gfx::Path path; |
| 572 path.addRoundRect(rect, kRoundedCornerRad, SkPath::kCW_Direction); | 571 path.addRoundRect(rect, kRoundedCornerRad, SkPath::kCW_Direction); |
| 573 widget->SetShape(path.CreateNativeRegion()); | 572 widget->SetShape(path.CreateNativeRegion()); |
| 574 } | 573 } |
| OLD | NEW |