Chromium Code Reviews| 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 "ui/views/controls/menu/menu_scroll_view_container.h" | 5 #include "ui/views/controls/menu/menu_scroll_view_container.h" |
| 6 | 6 |
| 7 #include "third_party/skia/include/core/SkPaint.h" | 7 #include "third_party/skia/include/core/SkPaint.h" |
| 8 #include "third_party/skia/include/core/SkPath.h" | 8 #include "third_party/skia/include/core/SkPath.h" |
| 9 #include "ui/accessibility/ax_view_state.h" | 9 #include "ui/accessibility/ax_view_state.h" |
| 10 #include "ui/gfx/canvas.h" | 10 #include "ui/gfx/canvas.h" |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 274 arrow_ = BubbleBorder::NONE; | 274 arrow_ = BubbleBorder::NONE; |
| 275 bubble_border_ = NULL; | 275 bubble_border_ = NULL; |
| 276 | 276 |
| 277 const MenuConfig& menu_config = | 277 const MenuConfig& menu_config = |
| 278 content_view_->GetMenuItem()->GetMenuConfig(); | 278 content_view_->GetMenuItem()->GetMenuConfig(); |
| 279 | 279 |
| 280 bool use_border = true; | 280 bool use_border = true; |
| 281 int padding = menu_config.corner_radius > 0 ? | 281 int padding = menu_config.corner_radius > 0 ? |
| 282 kBorderPaddingDueToRoundedCorners : 0; | 282 kBorderPaddingDueToRoundedCorners : 0; |
| 283 | 283 |
| 284 #if !(defined(OS_LINUX) && !defined(OS_CHROMEOS)) | 284 #if defined(USE_AURA) && !(defined(OS_LINUX) && !defined(OS_CHROMEOS)) |
| 285 if (menu_config.native_theme == ui::NativeThemeAura::instance()) { | 285 if (menu_config.native_theme == ui::NativeThemeAura::instance()) { |
|
tapted
2014/05/02 00:22:57
This could maybe be something like
virtual int Na
| |
| 286 // In case of NativeThemeAura the border gets drawn with the shadow. | 286 // In case of NativeThemeAura the border gets drawn with the shadow. |
| 287 // Furthermore no additional padding is wanted. | 287 // Furthermore no additional padding is wanted. |
| 288 use_border = false; | 288 use_border = false; |
| 289 padding = 0; | 289 padding = 0; |
| 290 } | 290 } |
| 291 #endif | 291 #endif |
| 292 | 292 |
| 293 int top = menu_config.menu_vertical_border_size + padding; | 293 int top = menu_config.menu_vertical_border_size + padding; |
| 294 int left = menu_config.menu_horizontal_border_size + padding; | 294 int left = menu_config.menu_horizontal_border_size + padding; |
| 295 int bottom = menu_config.menu_vertical_border_size + padding; | 295 int bottom = menu_config.menu_vertical_border_size + padding; |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 326 case views::MenuItemView::BUBBLE_ABOVE: | 326 case views::MenuItemView::BUBBLE_ABOVE: |
| 327 return BubbleBorder::BOTTOM_CENTER; | 327 return BubbleBorder::BOTTOM_CENTER; |
| 328 case views::MenuItemView::BUBBLE_BELOW: | 328 case views::MenuItemView::BUBBLE_BELOW: |
| 329 return BubbleBorder::TOP_CENTER; | 329 return BubbleBorder::TOP_CENTER; |
| 330 default: | 330 default: |
| 331 return BubbleBorder::NONE; | 331 return BubbleBorder::NONE; |
| 332 } | 332 } |
| 333 } | 333 } |
| 334 | 334 |
| 335 } // namespace views | 335 } // namespace views |
| OLD | NEW |