OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |