| 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 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 LayoutDelegate::Metric::DIALOG_BUTTON_MARGIN); | 581 LayoutDelegate::Metric::DIALOG_BUTTON_MARGIN); |
| 582 // Titles are inset at the top and sides, but not at the bottom. | 582 // Titles are inset at the top and sides, but not at the bottom. |
| 583 return gfx::Insets(top, side, 0, side); | 583 return gfx::Insets(top, side, 0, side); |
| 584 } | 584 } |
| 585 | 585 |
| 586 gfx::Insets ChromeViewsDelegate::GetBubbleDialogMargins() const { | 586 gfx::Insets ChromeViewsDelegate::GetBubbleDialogMargins() const { |
| 587 return gfx::Insets(LayoutDelegate::Get()->GetMetric( | 587 return gfx::Insets(LayoutDelegate::Get()->GetMetric( |
| 588 LayoutDelegate::Metric::PANEL_CONTENT_MARGIN)); | 588 LayoutDelegate::Metric::PANEL_CONTENT_MARGIN)); |
| 589 } | 589 } |
| 590 | 590 |
| 591 int ChromeViewsDelegate::GetButtonMinimumWidth() const { |
| 592 return LayoutDelegate::Get()->GetMetric( |
| 593 LayoutDelegate::Metric::BUTTON_MINIMUM_WIDTH); |
| 594 } |
| 595 |
| 591 int ChromeViewsDelegate::GetDialogButtonMinimumWidth() const { | 596 int ChromeViewsDelegate::GetDialogButtonMinimumWidth() const { |
| 592 return LayoutDelegate::Get()->GetMetric( | 597 return LayoutDelegate::Get()->GetMetric( |
| 593 LayoutDelegate::Metric::DIALOG_BUTTON_MINIMUM_WIDTH); | 598 LayoutDelegate::Metric::DIALOG_BUTTON_MINIMUM_WIDTH); |
| 594 } | 599 } |
| 595 | 600 |
| 596 int ChromeViewsDelegate::GetButtonHorizontalPadding() const { | 601 int ChromeViewsDelegate::GetButtonHorizontalPadding() const { |
| 597 return LayoutDelegate::Get()->GetMetric( | 602 return LayoutDelegate::Get()->GetMetric( |
| 598 LayoutDelegate::Metric::BUTTON_HORIZONTAL_PADDING); | 603 LayoutDelegate::Metric::BUTTON_HORIZONTAL_PADDING); |
| 599 } | 604 } |
| 600 | 605 |
| 601 #if !defined(USE_ASH) | 606 #if !defined(USE_ASH) |
| 602 views::Widget::InitParams::WindowOpacity | 607 views::Widget::InitParams::WindowOpacity |
| 603 ChromeViewsDelegate::GetOpacityForInitParams( | 608 ChromeViewsDelegate::GetOpacityForInitParams( |
| 604 const views::Widget::InitParams& params) { | 609 const views::Widget::InitParams& params) { |
| 605 return views::Widget::InitParams::OPAQUE_WINDOW; | 610 return views::Widget::InitParams::OPAQUE_WINDOW; |
| 606 } | 611 } |
| 607 #endif | 612 #endif |
| OLD | NEW |