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

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

Issue 2243473002: Adding overflow menu to media player (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 3 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) 2009 Apple Inc. 2 * Copyright (C) 2009 Apple Inc.
3 * Copyright (C) 2009 Google Inc. 3 * Copyright (C) 2009 Google Inc.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 { 597 {
598 const HTMLMediaElement* mediaElement = toParentMediaElement(object); 598 const HTMLMediaElement* mediaElement = toParentMediaElement(object);
599 if (!mediaElement) 599 if (!mediaElement)
600 return false; 600 return false;
601 601
602 static Image* mediaSubtitlesIcon = platformResource("mediaplayerSubtitlesIco n", 602 static Image* mediaSubtitlesIcon = platformResource("mediaplayerSubtitlesIco n",
603 "mediaplayerSubtitlesIconNew"); 603 "mediaplayerSubtitlesIconNew");
604 return paintMediaButton(paintInfo.context, rect, mediaSubtitlesIcon); 604 return paintMediaButton(paintInfo.context, rect, mediaSubtitlesIcon);
605 } 605 }
606 606
607 bool MediaControlsPainter::paintMediaOverflowMenu(const LayoutObject& object, co nst PaintInfo& paintInfo, const IntRect& rect)
608 {
609 const HTMLMediaElement* mediaElement = toParentMediaElement(object);
610 if (!mediaElement)
611 return false;
612
613 static Image* mediaOverflowButton = platformResource("mediaplayerOverflowMen u");
614 return paintMediaButton(paintInfo.context, rect, mediaOverflowButton);
615 }
616
607 void MediaControlsPainter::adjustMediaSliderThumbSize(ComputedStyle& style) 617 void MediaControlsPainter::adjustMediaSliderThumbSize(ComputedStyle& style)
608 { 618 {
609 static Image* mediaSliderThumb = platformResource("mediaplayerSliderThumb", 619 static Image* mediaSliderThumb = platformResource("mediaplayerSliderThumb",
610 "mediaplayerSliderThumbNew"); 620 "mediaplayerSliderThumbNew");
611 static Image* mediaVolumeSliderThumb = platformResource( 621 static Image* mediaVolumeSliderThumb = platformResource(
612 "mediaplayerVolumeSliderThumb", 622 "mediaplayerVolumeSliderThumb",
613 "mediaplayerVolumeSliderThumbNew"); 623 "mediaplayerVolumeSliderThumbNew");
614 int width = 0; 624 int width = 0;
615 int height = 0; 625 int height = 0;
616 626
(...skipping 15 matching lines...) Expand all
632 } 642 }
633 643
634 float zoomLevel = style.effectiveZoom(); 644 float zoomLevel = style.effectiveZoom();
635 if (thumbImage) { 645 if (thumbImage) {
636 style.setWidth(Length(static_cast<int>(width * zoomLevel), Fixed)); 646 style.setWidth(Length(static_cast<int>(width * zoomLevel), Fixed));
637 style.setHeight(Length(static_cast<int>(height * zoomLevel), Fixed)); 647 style.setHeight(Length(static_cast<int>(height * zoomLevel), Fixed));
638 } 648 }
639 } 649 }
640 650
641 } // namespace blink 651 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/MediaControlsPainter.h ('k') | third_party/WebKit/Source/core/paint/ThemePainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698