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

Side by Side Diff: Source/core/paint/ThemePainterMac.mm

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/ThemePainterMac.h ('k') | no next file » | 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) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2008, 2009 Google, Inc. 3 * Copyright (C) 2008, 2009 Google, Inc.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details. 13 * Library General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU Library General Public License 15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to 16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA. 18 * Boston, MA 02110-1301, USA.
19 */ 19 */
20 20
21 #import "config.h" 21 #import "config.h"
22 #import "core/paint/ThemePainterMac.h" 22 #import "core/paint/ThemePainterMac.h"
23 23
24 #import "core/layout/LayoutMeter.h" 24 #import "core/layout/LayoutMeter.h"
25 #import "core/layout/LayoutProgress.h" 25 #import "core/layout/LayoutProgress.h"
26 #import "core/layout/LayoutThemeMac.h" 26 #import "core/layout/LayoutThemeMac.h"
27 #import "core/layout/LayoutView.h" 27 #import "core/layout/LayoutView.h"
28 #import "core/paint/MediaControlsPainter.h"
29 #import "core/paint/PaintInfo.h" 28 #import "core/paint/PaintInfo.h"
30 #import "platform/geometry/FloatRoundedRect.h" 29 #import "platform/geometry/FloatRoundedRect.h"
31 #import "platform/graphics/BitmapImage.h" 30 #import "platform/graphics/BitmapImage.h"
32 #import "platform/graphics/GraphicsContextStateSaver.h" 31 #import "platform/graphics/GraphicsContextStateSaver.h"
33 #import "platform/graphics/Image.h" 32 #import "platform/graphics/Image.h"
34 #import "platform/graphics/ImageBuffer.h" 33 #import "platform/graphics/ImageBuffer.h"
35 #import "platform/mac/ColorMac.h" 34 #import "platform/mac/ColorMac.h"
36 #import "platform/mac/LocalCurrentGraphicsContext.h" 35 #import "platform/mac/LocalCurrentGraphicsContext.h"
37 #import "platform/mac/ThemeMac.h" 36 #import "platform/mac/ThemeMac.h"
38 #import "platform/mac/WebCoreNSCellExtras.h" 37 #import "platform/mac/WebCoreNSCellExtras.h"
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 if ([search searchMenuTemplate] != nil) 592 if ([search searchMenuTemplate] != nil)
594 [search setSearchMenuTemplate:nil]; 593 [search setSearchMenuTemplate:nil];
595 594
596 m_layoutTheme.updateActiveState([search searchButtonCell], o); 595 m_layoutTheme.updateActiveState([search searchButtonCell], o);
597 596
598 [[search searchButtonCell] drawWithFrame:unzoomedRect inView:m_layoutTheme.d ocumentViewFor(o)]; 597 [[search searchButtonCell] drawWithFrame:unzoomedRect inView:m_layoutTheme.d ocumentViewFor(o)];
599 [[search searchButtonCell] setControlView:nil]; 598 [[search searchButtonCell] setControlView:nil];
600 return false; 599 return false;
601 } 600 }
602 601
603 bool ThemePainterMac::paintMediaPlayButton(LayoutObject* object, const PaintInfo & paintInfo, const IntRect& rect)
604 {
605 return MediaControlsPainter::paintMediaControlsPart(MediaPlayButton, object, paintInfo, rect);
606 }
607
608 bool ThemePainterMac::paintMediaOverlayPlayButton(LayoutObject* object, const Pa intInfo& paintInfo, const IntRect& rect)
609 {
610 return MediaControlsPainter::paintMediaControlsPart(MediaOverlayPlayButton, object, paintInfo, rect);
611 }
612
613 bool ThemePainterMac::paintMediaMuteButton(LayoutObject* object, const PaintInfo & paintInfo, const IntRect& rect)
614 {
615 return MediaControlsPainter::paintMediaControlsPart(MediaMuteButton, object, paintInfo, rect);
616 }
617
618 bool ThemePainterMac::paintMediaSliderTrack(LayoutObject* object, const PaintInf o& paintInfo, const IntRect& rect)
619 {
620 return MediaControlsPainter::paintMediaControlsPart(MediaSlider, object, pai ntInfo, rect);
621 }
622
623 bool ThemePainterMac::paintMediaVolumeSliderContainer(LayoutObject* object, cons t PaintInfo& paintInfo, const IntRect& rect)
624 {
625 return true;
626 }
627
628 bool ThemePainterMac::paintMediaVolumeSliderTrack(LayoutObject* object, const Pa intInfo& paintInfo, const IntRect& rect)
629 {
630 return MediaControlsPainter::paintMediaControlsPart(MediaVolumeSlider, objec t, paintInfo, rect);
631 }
632
633 bool ThemePainterMac::paintMediaVolumeSliderThumb(LayoutObject* object, const Pa intInfo& paintInfo, const IntRect& rect)
634 {
635 return MediaControlsPainter::paintMediaControlsPart(MediaVolumeSliderThumb, object, paintInfo, rect);
636 }
637
638 bool ThemePainterMac::paintMediaSliderThumb(LayoutObject* object, const PaintInf o& paintInfo, const IntRect& rect)
639 {
640 return MediaControlsPainter::paintMediaControlsPart(MediaSliderThumb, object , paintInfo, rect);
641 }
642
643 bool ThemePainterMac::paintMediaFullscreenButton(LayoutObject* object, const Pai ntInfo& paintInfo, const IntRect& rect)
644 {
645 return MediaControlsPainter::paintMediaControlsPart(MediaEnterFullscreenButt on, object, paintInfo, rect);
646 }
647
648 bool ThemePainterMac::paintMediaToggleClosedCaptionsButton(LayoutObject* object, const PaintInfo& paintInfo, const IntRect& rect)
649 {
650 return MediaControlsPainter::paintMediaControlsPart(MediaShowClosedCaptionsB utton, object, paintInfo, rect);
651 }
652
653 } // namespace blink 602 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/paint/ThemePainterMac.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698