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

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

Issue 1115203003: De-virtualize media control painting methods (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Mac doesn't want cast button Created 5 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/paint/ThemePainterDefault.h ('k') | Source/core/paint/ThemePainterMac.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 LayoutRect magnifierRect(magnifierObject->offsetFromAncestorContainer(inputL ayoutBox).width(), 421 LayoutRect magnifierRect(magnifierObject->offsetFromAncestorContainer(inputL ayoutBox).width(),
422 inputContentBox.y() + (inputContentBox.height() - magnifierSize + 1) / 2 , 422 inputContentBox.y() + (inputContentBox.height() - magnifierSize + 1) / 2 ,
423 magnifierSize, magnifierSize); 423 magnifierSize, magnifierSize);
424 IntRect paintingRect = convertToPaintingRect(inputLayoutBox, magnifierObject , magnifierRect, r); 424 IntRect paintingRect = convertToPaintingRect(inputLayoutBox, magnifierObject , magnifierRect, r);
425 425
426 DEFINE_STATIC_REF(Image, magnifierImage, (Image::loadPlatformResource("searc hMagnifier"))); 426 DEFINE_STATIC_REF(Image, magnifierImage, (Image::loadPlatformResource("searc hMagnifier")));
427 paintInfo.context->drawImage(magnifierImage, paintingRect); 427 paintInfo.context->drawImage(magnifierImage, paintingRect);
428 return false; 428 return false;
429 } 429 }
430 430
431 bool ThemePainterDefault::paintMediaSliderTrack(LayoutObject* object, const Pain tInfo& paintInfo, const IntRect& rect) 431 bool ThemePainterDefault::paintMediaCastButton(LayoutObject* object, const Paint Info& paintInfo, const IntRect& rect)
432 { 432 {
433 return MediaControlsPainter::paintMediaControlsPart(MediaSlider, object, pai ntInfo, rect); 433 return MediaControlsPainter::paintMediaCastButton(object, paintInfo, rect);
434 }
435
436 bool ThemePainterDefault::paintMediaVolumeSliderTrack(LayoutObject* object, cons t PaintInfo& paintInfo, const IntRect& rect)
437 {
438 return MediaControlsPainter::paintMediaControlsPart(MediaVolumeSlider, objec t, paintInfo, rect);
439 }
440
441 bool ThemePainterDefault::paintMediaSliderThumb(LayoutObject* object, const Pain tInfo& paintInfo, const IntRect& rect)
442 {
443 return MediaControlsPainter::paintMediaControlsPart(MediaSliderThumb, object , paintInfo, rect);
444 }
445
446 bool ThemePainterDefault::paintMediaToggleClosedCaptionsButton(LayoutObject* o, const PaintInfo& paintInfo, const IntRect& r)
447 {
448 return MediaControlsPainter::paintMediaControlsPart(MediaShowClosedCaptionsB utton, o, paintInfo, r);
449 }
450
451 bool ThemePainterDefault::paintMediaCastButton(LayoutObject* o, const PaintInfo& paintInfo, const IntRect& r)
452 {
453 return MediaControlsPainter::paintMediaControlsPart(MediaCastOffButton, o, p aintInfo, r);
454 }
455
456 bool ThemePainterDefault::paintMediaVolumeSliderThumb(LayoutObject* object, cons t PaintInfo& paintInfo, const IntRect& rect)
457 {
458 return MediaControlsPainter::paintMediaControlsPart(MediaVolumeSliderThumb, object, paintInfo, rect);
459 }
460
461 bool ThemePainterDefault::paintMediaPlayButton(LayoutObject* object, const Paint Info& paintInfo, const IntRect& rect)
462 {
463 return MediaControlsPainter::paintMediaControlsPart(MediaPlayButton, object, paintInfo, rect);
464 }
465
466 bool ThemePainterDefault::paintMediaOverlayPlayButton(LayoutObject* object, cons t PaintInfo& paintInfo, const IntRect& rect)
467 {
468 return MediaControlsPainter::paintMediaControlsPart(MediaOverlayPlayButton, object, paintInfo, rect);
469 }
470
471 bool ThemePainterDefault::paintMediaMuteButton(LayoutObject* object, const Paint Info& paintInfo, const IntRect& rect)
472 {
473 return MediaControlsPainter::paintMediaControlsPart(MediaMuteButton, object, paintInfo, rect);
474 }
475
476 bool ThemePainterDefault::paintMediaFullscreenButton(LayoutObject* object, const PaintInfo& paintInfo, const IntRect& rect)
477 {
478 return MediaControlsPainter::paintMediaControlsPart(MediaEnterFullscreenButt on, object, paintInfo, rect);
479 } 434 }
480 435
481 } // namespace blink 436 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/paint/ThemePainterDefault.h ('k') | Source/core/paint/ThemePainterMac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698