| 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 "chrome/browser/ui/views/chrome_views_delegate.h" | 5 #include "chrome/browser/ui/views/chrome_views_delegate.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 if (ui::MaterialDesignController::IsSecondaryUiMaterial()) | 572 if (ui::MaterialDesignController::IsSecondaryUiMaterial()) |
| 573 return gfx::Insets(HarmonyLayoutDelegate::kHarmonyLayoutUnit); | 573 return gfx::Insets(HarmonyLayoutDelegate::kHarmonyLayoutUnit); |
| 574 return ViewsDelegate::GetBubbleDialogMargins(); | 574 return ViewsDelegate::GetBubbleDialogMargins(); |
| 575 } | 575 } |
| 576 | 576 |
| 577 gfx::Insets ChromeViewsDelegate::GetButtonPadding() const { | 577 gfx::Insets ChromeViewsDelegate::GetButtonPadding() const { |
| 578 return gfx::Insets(LayoutDelegate::Get()->GetMetric( | 578 return gfx::Insets(LayoutDelegate::Get()->GetMetric( |
| 579 LayoutDelegate::Metric::BUTTON_PADDING)); | 579 LayoutDelegate::Metric::BUTTON_PADDING)); |
| 580 } | 580 } |
| 581 | 581 |
| 582 int ChromeViewsDelegate::GetCloseButtonMargin() const { |
| 583 return LayoutDelegate::Get()->GetMetric( |
| 584 LayoutDelegate::Metric::DIALOG_CLOSE_BUTTON_MARGIN); |
| 585 } |
| 586 |
| 582 #if !defined(USE_ASH) | 587 #if !defined(USE_ASH) |
| 583 views::Widget::InitParams::WindowOpacity | 588 views::Widget::InitParams::WindowOpacity |
| 584 ChromeViewsDelegate::GetOpacityForInitParams( | 589 ChromeViewsDelegate::GetOpacityForInitParams( |
| 585 const views::Widget::InitParams& params) { | 590 const views::Widget::InitParams& params) { |
| 586 return views::Widget::InitParams::OPAQUE_WINDOW; | 591 return views::Widget::InitParams::OPAQUE_WINDOW; |
| 587 } | 592 } |
| 588 #endif | 593 #endif |
| OLD | NEW |