| 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 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 return gfx::Insets(HarmonyLayoutDelegate::kHarmonyLayoutUnit); | 537 return gfx::Insets(HarmonyLayoutDelegate::kHarmonyLayoutUnit); |
| 538 return ViewsDelegate::GetDialogButtonInsets(); | 538 return ViewsDelegate::GetDialogButtonInsets(); |
| 539 } | 539 } |
| 540 | 540 |
| 541 int ChromeViewsDelegate::GetDialogRelatedButtonHorizontalSpacing() { | 541 int ChromeViewsDelegate::GetDialogRelatedButtonHorizontalSpacing() { |
| 542 if (ui::MaterialDesignController::IsSecondaryUiMaterial()) | 542 if (ui::MaterialDesignController::IsSecondaryUiMaterial()) |
| 543 return HarmonyLayoutDelegate::kHarmonyLayoutUnit / 2; | 543 return HarmonyLayoutDelegate::kHarmonyLayoutUnit / 2; |
| 544 return ViewsDelegate::GetDialogRelatedButtonHorizontalSpacing(); | 544 return ViewsDelegate::GetDialogRelatedButtonHorizontalSpacing(); |
| 545 } | 545 } |
| 546 | 546 |
| 547 gfx::Insets ChromeViewsDelegate::GetDialogFrameViewInsets() { |
| 548 if (ui::MaterialDesignController::IsSecondaryUiMaterial()) { |
| 549 // Titles are inset at the top and sides, but not at the bottom. |
| 550 return gfx::Insets(HarmonyLayoutDelegate::kHarmonyLayoutUnit, |
| 551 HarmonyLayoutDelegate::kHarmonyLayoutUnit, 0, |
| 552 HarmonyLayoutDelegate::kHarmonyLayoutUnit); |
| 553 } |
| 554 return ViewsDelegate::GetDialogFrameViewInsets(); |
| 555 } |
| 556 |
| 547 #if !defined(USE_ASH) | 557 #if !defined(USE_ASH) |
| 548 views::Widget::InitParams::WindowOpacity | 558 views::Widget::InitParams::WindowOpacity |
| 549 ChromeViewsDelegate::GetOpacityForInitParams( | 559 ChromeViewsDelegate::GetOpacityForInitParams( |
| 550 const views::Widget::InitParams& params) { | 560 const views::Widget::InitParams& params) { |
| 551 return views::Widget::InitParams::OPAQUE_WINDOW; | 561 return views::Widget::InitParams::OPAQUE_WINDOW; |
| 552 } | 562 } |
| 553 #endif | 563 #endif |
| OLD | NEW |