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

Side by Side Diff: third_party/WebKit/Source/core/paint/ThemePainterDefault.cpp

Issue 2824753005: Rename HostWindow to PlatformChromeClient (Closed)
Patch Set: mac 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 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. 2 * Copyright (C) 2007 Apple Inc.
3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
4 * Copyright (C) 2008 Collabora Ltd. 4 * Copyright (C) 2008 Collabora Ltd.
5 * Copyright (C) 2008, 2009 Google Inc. 5 * Copyright (C) 2008, 2009 Google Inc.
6 * Copyright (C) 2009 Kenneth Rohde Christiansen 6 * Copyright (C) 2009 Kenneth Rohde Christiansen
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 void ThemePainterDefault::SetupMenuListArrow( 283 void ThemePainterDefault::SetupMenuListArrow(
284 const LayoutBox& box, 284 const LayoutBox& box,
285 const IntRect& rect, 285 const IntRect& rect,
286 WebThemeEngine::ExtraParams& extra_params) { 286 WebThemeEngine::ExtraParams& extra_params) {
287 const int left = rect.X() + box.BorderLeft().ToInt(); 287 const int left = rect.X() + box.BorderLeft().ToInt();
288 const int right = rect.X() + rect.Width() - box.BorderRight().ToInt(); 288 const int right = rect.X() + rect.Width() - box.BorderRight().ToInt();
289 const int middle = rect.Y() + rect.Height() / 2; 289 const int middle = rect.Y() + rect.Height() / 2;
290 290
291 extra_params.menu_list.arrow_y = middle; 291 extra_params.menu_list.arrow_y = middle;
292 float arrow_box_width = theme_.ClampedMenuListArrowPaddingSize( 292 float arrow_box_width = theme_.ClampedMenuListArrowPaddingSize(
293 box.GetFrameView()->GetHostWindow(), box.StyleRef()); 293 box.GetFrameView()->GetChromeClient(), box.StyleRef());
294 float arrow_scale_factor = arrow_box_width / theme_.MenuListArrowWidthInDIP(); 294 float arrow_scale_factor = arrow_box_width / theme_.MenuListArrowWidthInDIP();
295 if (UseMockTheme()) { 295 if (UseMockTheme()) {
296 // The size and position of the drop-down button is different between 296 // The size and position of the drop-down button is different between
297 // the mock theme and the regular aura theme. 297 // the mock theme and the regular aura theme.
298 298
299 // Padding inside the arrowBox. 299 // Padding inside the arrowBox.
300 float extra_padding = 2 * arrow_scale_factor; 300 float extra_padding = 2 * arrow_scale_factor;
301 float arrow_size = 301 float arrow_size =
302 std::min(arrow_box_width, 302 std::min(arrow_box_width,
303 static_cast<float>(rect.Height() - box.BorderTop() - 303 static_cast<float>(rect.Height() - box.BorderTop() -
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 DEFINE_STATIC_REF(Image, cancel_pressed_image, 468 DEFINE_STATIC_REF(Image, cancel_pressed_image,
469 (Image::LoadPlatformResource("searchCancelPressed"))); 469 (Image::LoadPlatformResource("searchCancelPressed")));
470 paint_info.context.DrawImage(LayoutTheme::IsPressed(cancel_button_object) 470 paint_info.context.DrawImage(LayoutTheme::IsPressed(cancel_button_object)
471 ? cancel_pressed_image 471 ? cancel_pressed_image
472 : cancel_image, 472 : cancel_image,
473 painting_rect); 473 painting_rect);
474 return false; 474 return false;
475 } 475 }
476 476
477 } // namespace blink 477 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/ScrollableAreaPainter.cpp ('k') | third_party/WebKit/Source/platform/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698