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

Side by Side Diff: content/renderer/media/android/webmediaplayer_android.cc

Issue 1357423009: gfx: Make conversions from Size to SizeF be explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sizefconvert-gfx: . Created 5 years, 2 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 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/media/android/webmediaplayer_android.h" 5 #include "content/renderer/media/android/webmediaplayer_android.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/android/build_info.h" 9 #include "base/android/build_info.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1415 matching lines...) Expand 10 before | Expand all | Expand 10 after
1426 } 1426 }
1427 } 1427 }
1428 1428
1429 #if defined(VIDEO_HOLE) 1429 #if defined(VIDEO_HOLE)
1430 bool WebMediaPlayerAndroid::UpdateBoundaryRectangle() { 1430 bool WebMediaPlayerAndroid::UpdateBoundaryRectangle() {
1431 if (!video_weblayer_) 1431 if (!video_weblayer_)
1432 return false; 1432 return false;
1433 1433
1434 // Compute the geometry of video frame layer. 1434 // Compute the geometry of video frame layer.
1435 cc::Layer* layer = video_weblayer_->layer(); 1435 cc::Layer* layer = video_weblayer_->layer();
1436 gfx::RectF rect(layer->bounds()); 1436 gfx::RectF rect(gfx::SizeF(layer->bounds()));
1437 while (layer) { 1437 while (layer) {
1438 rect.Offset(layer->position().OffsetFromOrigin()); 1438 rect.Offset(layer->position().OffsetFromOrigin());
1439 layer = layer->parent(); 1439 layer = layer->parent();
1440 } 1440 }
1441 1441
1442 // Return false when the geometry hasn't been changed from the last time. 1442 // Return false when the geometry hasn't been changed from the last time.
1443 if (last_computed_rect_ == rect) 1443 if (last_computed_rect_ == rect)
1444 return false; 1444 return false;
1445 1445
1446 // Store the changed geometry information when it is actually changed. 1446 // Store the changed geometry information when it is actually changed.
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
1911 1911
1912 bool is_hls = IsHLSStream(); 1912 bool is_hls = IsHLSStream();
1913 UMA_HISTOGRAM_BOOLEAN("Media.Android.IsHttpLiveStreamingMedia", is_hls); 1913 UMA_HISTOGRAM_BOOLEAN("Media.Android.IsHttpLiveStreamingMedia", is_hls);
1914 if (is_hls) { 1914 if (is_hls) {
1915 media::RecordOriginOfHLSPlayback( 1915 media::RecordOriginOfHLSPlayback(
1916 GURL(frame_->document().securityOrigin().toString())); 1916 GURL(frame_->document().securityOrigin().toString()));
1917 } 1917 }
1918 } 1918 }
1919 1919
1920 } // namespace content 1920 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/disambiguation_popup_helper_unittest.cc ('k') | content/renderer/pepper/pepper_graphics_2d_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698