OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "webkit/media/android/webmediaplayer_android.h" | 5 #include "webkit/media/android/webmediaplayer_android.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "cc/layers/video_layer.h" | 10 #include "cc/layers/video_layer.h" |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
473 } | 473 } |
474 | 474 |
475 void WebMediaPlayerAndroid::SetNeedsEstablishPeer(bool needs_establish_peer) { | 475 void WebMediaPlayerAndroid::SetNeedsEstablishPeer(bool needs_establish_peer) { |
476 needs_establish_peer_ = needs_establish_peer; | 476 needs_establish_peer_ = needs_establish_peer; |
477 } | 477 } |
478 | 478 |
479 void WebMediaPlayerAndroid::UpdatePlayingState(bool is_playing) { | 479 void WebMediaPlayerAndroid::UpdatePlayingState(bool is_playing) { |
480 is_playing_ = is_playing; | 480 is_playing_ = is_playing; |
481 } | 481 } |
482 | 482 |
483 bool WebMediaPlayerAndroid::GetGeometryChange(gfx::RectF* rect) { | |
484 if (!video_weblayer_) | |
485 return false; | |
486 | |
487 cc::Layer* layer = video_weblayer_->layer(); | |
488 rect->set_size(layer->bounds()); | |
489 while (layer) { | |
490 rect->Offset(layer->position().OffsetFromOrigin()); | |
491 layer = layer->parent(); | |
492 } | |
493 | |
494 if (rect_ == *rect) | |
scherkus (not reviewing)
2013/04/08 14:58:23
based on your usage, |rect| appears to always be (
wonsik
2013/04/09 09:13:22
|rect| represents the geometry of the video frame
| |
495 return false; | |
496 | |
497 rect_ = *rect; | |
498 return true; | |
499 } | |
500 | |
483 } // namespace webkit_media | 501 } // namespace webkit_media |
OLD | NEW |