Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: chrome/browser/ui/views/chrome_views_delegate.cc

Issue 2734113006: "Bootstrap" a toolkit-views Typography spec. (Closed)
Patch Set: Rebase (conflict in layout_delegate.h due to r457774) Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 } 261 }
262 NOTREACHED(); 262 NOTREACHED();
263 return 0; 263 return 0;
264 } 264 }
265 265
266 const views::TypographyProvider& ChromeViewsDelegate::GetTypographyProvider()
267 const {
268 return LayoutDelegate::Get()->GetTypographyProvider();
269 }
270
266 int ChromeViewsDelegate::GetDefaultDistanceMetric( 271 int ChromeViewsDelegate::GetDefaultDistanceMetric(
267 views::DistanceMetric metric) { 272 views::DistanceMetric metric) {
268 return views_delegate 273 return views_delegate
269 ? views_delegate->InternalGetDefaultDistanceMetric(metric) 274 ? views_delegate->InternalGetDefaultDistanceMetric(metric)
270 : views::ViewsDelegate::GetInstance()->GetDistanceMetric(metric); 275 : views::ViewsDelegate::GetInstance()->GetDistanceMetric(metric);
271 } 276 }
272 277
273 int ChromeViewsDelegate::InternalGetDefaultDistanceMetric( 278 int ChromeViewsDelegate::InternalGetDefaultDistanceMetric(
274 views::DistanceMetric metric) const { 279 views::DistanceMetric metric) const {
275 return views::ViewsDelegate::GetDistanceMetric(metric); 280 return views::ViewsDelegate::GetDistanceMetric(metric);
276 } 281 }
277 282
278 #if !defined(OS_CHROMEOS) 283 #if !defined(OS_CHROMEOS)
279 views::Widget::InitParams::WindowOpacity 284 views::Widget::InitParams::WindowOpacity
280 ChromeViewsDelegate::GetOpacityForInitParams( 285 ChromeViewsDelegate::GetOpacityForInitParams(
281 const views::Widget::InitParams& params) { 286 const views::Widget::InitParams& params) {
282 return views::Widget::InitParams::OPAQUE_WINDOW; 287 return views::Widget::InitParams::OPAQUE_WINDOW;
283 } 288 }
284 #endif 289 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698