| 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/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 LayoutDelegate::Metric::RELATED_CONTROL_HORIZONTAL_SPACING); | 251 LayoutDelegate::Metric::RELATED_CONTROL_HORIZONTAL_SPACING); |
| 252 case views::DistanceMetric::RELATED_CONTROL_VERTICAL: | 252 case views::DistanceMetric::RELATED_CONTROL_VERTICAL: |
| 253 return LayoutDelegate::Get()->GetMetric( | 253 return LayoutDelegate::Get()->GetMetric( |
| 254 LayoutDelegate::Metric::RELATED_CONTROL_VERTICAL_SPACING); | 254 LayoutDelegate::Metric::RELATED_CONTROL_VERTICAL_SPACING); |
| 255 case views::DistanceMetric::DIALOG_BUTTON_MINIMUM_WIDTH: | 255 case views::DistanceMetric::DIALOG_BUTTON_MINIMUM_WIDTH: |
| 256 return LayoutDelegate::Get()->GetMetric( | 256 return LayoutDelegate::Get()->GetMetric( |
| 257 LayoutDelegate::Metric::DIALOG_BUTTON_MINIMUM_WIDTH); | 257 LayoutDelegate::Metric::DIALOG_BUTTON_MINIMUM_WIDTH); |
| 258 case views::DistanceMetric::BUTTON_HORIZONTAL_PADDING: | 258 case views::DistanceMetric::BUTTON_HORIZONTAL_PADDING: |
| 259 return LayoutDelegate::Get()->GetMetric( | 259 return LayoutDelegate::Get()->GetMetric( |
| 260 LayoutDelegate::Metric::BUTTON_HORIZONTAL_PADDING); | 260 LayoutDelegate::Metric::BUTTON_HORIZONTAL_PADDING); |
| 261 case views::DistanceMetric::DIALOG_WIDTH_SNAPPING_UNIT: |
| 262 return LayoutDelegate::Get()->GetMetric( |
| 263 LayoutDelegate::Metric::DIALOG_WIDTH_SNAPPING_UNIT); |
| 261 } | 264 } |
| 262 NOTREACHED(); | 265 NOTREACHED(); |
| 263 return 0; | 266 return 0; |
| 264 } | 267 } |
| 265 | 268 |
| 266 int ChromeViewsDelegate::GetDefaultDistanceMetric( | 269 int ChromeViewsDelegate::GetDefaultDistanceMetric( |
| 267 views::DistanceMetric metric) const { | 270 views::DistanceMetric metric) const { |
| 268 return views::ViewsDelegate::GetDistanceMetric(metric); | 271 return views::ViewsDelegate::GetDistanceMetric(metric); |
| 269 } | 272 } |
| 270 | 273 |
| 271 #if !defined(OS_CHROMEOS) | 274 #if !defined(OS_CHROMEOS) |
| 272 views::Widget::InitParams::WindowOpacity | 275 views::Widget::InitParams::WindowOpacity |
| 273 ChromeViewsDelegate::GetOpacityForInitParams( | 276 ChromeViewsDelegate::GetOpacityForInitParams( |
| 274 const views::Widget::InitParams& params) { | 277 const views::Widget::InitParams& params) { |
| 275 return views::Widget::InitParams::OPAQUE_WINDOW; | 278 return views::Widget::InitParams::OPAQUE_WINDOW; |
| 276 } | 279 } |
| 277 #endif | 280 #endif |
| OLD | NEW |