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 "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 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 541 return gfx::Insets(HarmonyLayoutDelegate::kHarmonyLayoutUnit); | 541 return gfx::Insets(HarmonyLayoutDelegate::kHarmonyLayoutUnit); |
| 542 return ViewsDelegate::GetDialogButtonInsets(); | 542 return ViewsDelegate::GetDialogButtonInsets(); |
| 543 } | 543 } |
| 544 | 544 |
| 545 int ChromeViewsDelegate::GetDialogRelatedButtonHorizontalSpacing() { | 545 int ChromeViewsDelegate::GetDialogRelatedButtonHorizontalSpacing() { |
| 546 if (ui::MaterialDesignController::IsSecondaryUiMaterial()) | 546 if (ui::MaterialDesignController::IsSecondaryUiMaterial()) |
| 547 return HarmonyLayoutDelegate::kHarmonyLayoutUnit / 2; | 547 return HarmonyLayoutDelegate::kHarmonyLayoutUnit / 2; |
| 548 return ViewsDelegate::GetDialogRelatedButtonHorizontalSpacing(); | 548 return ViewsDelegate::GetDialogRelatedButtonHorizontalSpacing(); |
| 549 } | 549 } |
| 550 | 550 |
| 551 int ChromeViewsDelegate::GetDialogRelatedControlVerticalSpacing() { | |
| 552 if (ui::MaterialDesignController::IsSecondaryUiMaterial()) | |
| 553 return HarmonyLayoutDelegate::kHarmonyLayoutUnit / 2; | |
| 554 return ViewsDelegate::GetDialogRelatedControlVerticalSpacing(); | |
| 555 } | |
| 556 | |
| 551 gfx::Insets ChromeViewsDelegate::GetDialogFrameViewInsets() { | 557 gfx::Insets ChromeViewsDelegate::GetDialogFrameViewInsets() { |
| 552 if (ui::MaterialDesignController::IsSecondaryUiMaterial()) { | 558 if (ui::MaterialDesignController::IsSecondaryUiMaterial()) { |
| 553 // Titles are inset at the top and sides, but not at the bottom. | 559 // Titles are inset at the top and sides, but not at the bottom. |
| 554 return gfx::Insets(HarmonyLayoutDelegate::kHarmonyLayoutUnit, | 560 return gfx::Insets(HarmonyLayoutDelegate::kHarmonyLayoutUnit, |
| 555 HarmonyLayoutDelegate::kHarmonyLayoutUnit, 0, | 561 HarmonyLayoutDelegate::kHarmonyLayoutUnit, 0, |
| 556 HarmonyLayoutDelegate::kHarmonyLayoutUnit); | 562 HarmonyLayoutDelegate::kHarmonyLayoutUnit); |
| 557 } | 563 } |
| 558 return ViewsDelegate::GetDialogFrameViewInsets(); | 564 return ViewsDelegate::GetDialogFrameViewInsets(); |
| 559 } | 565 } |
| 560 | 566 |
| 567 gfx::Insets ChromeViewsDelegate::GetBubbleDialogMargins() { | |
| 568 if (ui::MaterialDesignController::IsSecondaryUiMaterial()) { | |
| 569 return gfx::Insets(HarmonyLayoutDelegate::kHarmonyLayoutUnit, | |
| 570 HarmonyLayoutDelegate::kHarmonyLayoutUnit, | |
| 571 HarmonyLayoutDelegate::kHarmonyLayoutUnit, | |
| 572 HarmonyLayoutDelegate::kHarmonyLayoutUnit); | |
| 573 } | |
| 574 return ViewsDelegate::GetDialogFrameViewInsets(); | |
|
sky
2017/01/05 23:26:40
Is it intentional that you aren't calling GetBubbl
kylix_rd
2017/01/06 14:36:50
Oops.
| |
| 575 } | |
| 576 | |
| 561 #if !defined(USE_ASH) | 577 #if !defined(USE_ASH) |
| 562 views::Widget::InitParams::WindowOpacity | 578 views::Widget::InitParams::WindowOpacity |
| 563 ChromeViewsDelegate::GetOpacityForInitParams( | 579 ChromeViewsDelegate::GetOpacityForInitParams( |
| 564 const views::Widget::InitParams& params) { | 580 const views::Widget::InitParams& params) { |
| 565 return views::Widget::InitParams::OPAQUE_WINDOW; | 581 return views::Widget::InitParams::OPAQUE_WINDOW; |
| 566 } | 582 } |
| 567 #endif | 583 #endif |
| OLD | NEW |