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

Side by Side Diff: Source/core/rendering/RenderThemeChromiumSkia.cpp

Issue 291163004: Implement media cast buttons (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
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 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
11 * 11 *
12 * This library is distributed in the hope that it will be useful, 12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details. 15 * Library General Public License for more details.
16 * 16 *
17 * You should have received a copy of the GNU Library General Public License 17 * You should have received a copy of the GNU Library General Public License
18 * along with this library; see the file COPYING.LIB. If not, write to 18 * along with this library; see the file COPYING.LIB. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301, USA. 20 * Boston, MA 02110-1301, USA.
21 * 21 *
22 */ 22 */
23 23
24 #include "config.h" 24 #include "config.h"
25 #include "core/rendering/RenderThemeChromiumSkia.h" 25 #include "core/rendering/RenderThemeChromiumSkia.h"
26 26
27 #include "UserAgentStyleSheets.h" 27 #include "UserAgentStyleSheets.h"
28
29 #include "base/logging.h"
30
28 #include "core/rendering/PaintInfo.h" 31 #include "core/rendering/PaintInfo.h"
29 #include "core/rendering/RenderBox.h" 32 #include "core/rendering/RenderBox.h"
30 #include "core/rendering/RenderMediaControls.h" 33 #include "core/rendering/RenderMediaControls.h"
31 #include "core/rendering/RenderObject.h" 34 #include "core/rendering/RenderObject.h"
32 #include "core/rendering/RenderProgress.h" 35 #include "core/rendering/RenderProgress.h"
33 #include "core/rendering/RenderThemeChromiumFontProvider.h" 36 #include "core/rendering/RenderThemeChromiumFontProvider.h"
34 #include "platform/LayoutTestSupport.h" 37 #include "platform/LayoutTestSupport.h"
35 #include "platform/graphics/GraphicsContext.h" 38 #include "platform/graphics/GraphicsContext.h"
36 #include "platform/graphics/Image.h" 39 #include "platform/graphics/Image.h"
37 #include "platform/scroll/ScrollbarTheme.h" 40 #include "platform/scroll/ScrollbarTheme.h"
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 311
309 bool RenderThemeChromiumSkia::paintMediaSliderThumb(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect) 312 bool RenderThemeChromiumSkia::paintMediaSliderThumb(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
310 { 313 {
311 return RenderMediaControls::paintMediaControlsPart(MediaSliderThumb, object, paintInfo, rect); 314 return RenderMediaControls::paintMediaControlsPart(MediaSliderThumb, object, paintInfo, rect);
312 } 315 }
313 316
314 bool RenderThemeChromiumSkia::paintMediaToggleClosedCaptionsButton(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r) 317 bool RenderThemeChromiumSkia::paintMediaToggleClosedCaptionsButton(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
315 { 318 {
316 return RenderMediaControls::paintMediaControlsPart(MediaShowClosedCaptionsBu tton, o, paintInfo, r); 319 return RenderMediaControls::paintMediaControlsPart(MediaShowClosedCaptionsBu tton, o, paintInfo, r);
317 } 320 }
318 321 bool RenderThemeChromiumSkia::paintMediaCastOnButton(RenderObject* o, const Pain tInfo& paintInfo, const IntRect& r)
322 {
323 LOG(INFO) << "Painting cast on in skia";
324 return RenderMediaControls::paintMediaControlsPart(MediaCastOnButton, o, pai ntInfo, r);
325 }
326 bool RenderThemeChromiumSkia::paintMediaCastOffButton(RenderObject* o, const Pai ntInfo& paintInfo, const IntRect& r)
327 {
328 LOG(INFO) << "Painting cast off in skia";
329 return RenderMediaControls::paintMediaControlsPart(MediaCastOffButton, o, pa intInfo, r);
330 }
319 bool RenderThemeChromiumSkia::paintMediaVolumeSliderThumb(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect) 331 bool RenderThemeChromiumSkia::paintMediaVolumeSliderThumb(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
320 { 332 {
321 return RenderMediaControls::paintMediaControlsPart(MediaVolumeSliderThumb, o bject, paintInfo, rect); 333 return RenderMediaControls::paintMediaControlsPart(MediaVolumeSliderThumb, o bject, paintInfo, rect);
322 } 334 }
323 335
324 bool RenderThemeChromiumSkia::paintMediaPlayButton(RenderObject* object, const P aintInfo& paintInfo, const IntRect& rect) 336 bool RenderThemeChromiumSkia::paintMediaPlayButton(RenderObject* object, const P aintInfo& paintInfo, const IntRect& rect)
325 { 337 {
326 return RenderMediaControls::paintMediaControlsPart(MediaPlayButton, object, paintInfo, rect); 338 return RenderMediaControls::paintMediaControlsPart(MediaPlayButton, object, paintInfo, rect);
327 } 339 }
328 340
329 bool RenderThemeChromiumSkia::paintMediaOverlayPlayButton(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect) 341 bool RenderThemeChromiumSkia::paintMediaOverlayPlayButton(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
330 { 342 {
343 LOG(INFO) << "Painting play button in skia";
331 return RenderMediaControls::paintMediaControlsPart(MediaOverlayPlayButton, o bject, paintInfo, rect); 344 return RenderMediaControls::paintMediaControlsPart(MediaOverlayPlayButton, o bject, paintInfo, rect);
332 } 345 }
333 346
334 bool RenderThemeChromiumSkia::paintMediaMuteButton(RenderObject* object, const P aintInfo& paintInfo, const IntRect& rect) 347 bool RenderThemeChromiumSkia::paintMediaMuteButton(RenderObject* object, const P aintInfo& paintInfo, const IntRect& rect)
335 { 348 {
336 return RenderMediaControls::paintMediaControlsPart(MediaMuteButton, object, paintInfo, rect); 349 return RenderMediaControls::paintMediaControlsPart(MediaMuteButton, object, paintInfo, rect);
337 } 350 }
338 351
339 String RenderThemeChromiumSkia::formatMediaControlsTime(float time) const 352 String RenderThemeChromiumSkia::formatMediaControlsTime(float time) const
340 { 353 {
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 } 494 }
482 495
483 RenderThemeChromiumSkia::DirectionFlippingScope::~DirectionFlippingScope() 496 RenderThemeChromiumSkia::DirectionFlippingScope::~DirectionFlippingScope()
484 { 497 {
485 if (!m_needsFlipping) 498 if (!m_needsFlipping)
486 return; 499 return;
487 m_paintInfo.context->restore(); 500 m_paintInfo.context->restore();
488 } 501 }
489 502
490 } // namespace WebCore 503 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698