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

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

Issue 2779973003: views: fold layout_utils::CreatePanelLayout into GridLayout::CreatePanel (Closed)
Patch Set: remove old DEPS entry Created 3 years, 8 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 const int top = layout_delegate->GetMetric( 224 const int top = layout_delegate->GetMetric(
225 LayoutDelegate::Metric::PANEL_CONTENT_MARGIN); 225 LayoutDelegate::Metric::PANEL_CONTENT_MARGIN);
226 const int side = layout_delegate->GetMetric( 226 const int side = layout_delegate->GetMetric(
227 LayoutDelegate::Metric::DIALOG_BUTTON_MARGIN); 227 LayoutDelegate::Metric::DIALOG_BUTTON_MARGIN);
228 // Titles are inset at the top and sides, but not at the bottom. 228 // Titles are inset at the top and sides, but not at the bottom.
229 return gfx::Insets(top, side, 0, side); 229 return gfx::Insets(top, side, 0, side);
230 } 230 }
231 case views::InsetsMetric::BUBBLE_DIALOG: 231 case views::InsetsMetric::BUBBLE_DIALOG:
232 return gfx::Insets(layout_delegate->GetMetric( 232 return gfx::Insets(layout_delegate->GetMetric(
233 LayoutDelegate::Metric::PANEL_CONTENT_MARGIN)); 233 LayoutDelegate::Metric::PANEL_CONTENT_MARGIN));
234 case views::InsetsMetric::PANEL:
235 return gfx::Insets(layout_delegate->GetMetric(
236 LayoutDelegate::Metric::PANEL_CONTENT_MARGIN),
237 layout_delegate->GetMetric(
238 LayoutDelegate::Metric::DIALOG_BUTTON_MARGIN));
234 case views::InsetsMetric::VECTOR_IMAGE_BUTTON_PADDING: 239 case views::InsetsMetric::VECTOR_IMAGE_BUTTON_PADDING:
235 return gfx::Insets(layout_delegate->GetMetric( 240 return gfx::Insets(layout_delegate->GetMetric(
236 LayoutDelegate::Metric::VECTOR_IMAGE_BUTTON_PADDING)); 241 LayoutDelegate::Metric::VECTOR_IMAGE_BUTTON_PADDING));
237 } 242 }
238 NOTREACHED(); 243 NOTREACHED();
239 return gfx::Insets(); 244 return gfx::Insets();
240 } 245 }
241 246
242 int ChromeViewsDelegate::GetDistanceMetric(views::DistanceMetric metric) const { 247 int ChromeViewsDelegate::GetDistanceMetric(views::DistanceMetric metric) const {
243 switch (metric) { 248 switch (metric) {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 return views::ViewsDelegate::GetDistanceMetric(metric); 286 return views::ViewsDelegate::GetDistanceMetric(metric);
282 } 287 }
283 288
284 #if !defined(OS_CHROMEOS) 289 #if !defined(OS_CHROMEOS)
285 views::Widget::InitParams::WindowOpacity 290 views::Widget::InitParams::WindowOpacity
286 ChromeViewsDelegate::GetOpacityForInitParams( 291 ChromeViewsDelegate::GetOpacityForInitParams(
287 const views::Widget::InitParams& params) { 292 const views::Widget::InitParams& params) {
288 return views::Widget::InitParams::OPAQUE_WINDOW; 293 return views::Widget::InitParams::OPAQUE_WINDOW;
289 } 294 }
290 #endif 295 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/certificate_selector.cc ('k') | chrome/browser/ui/views/collected_cookies_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698