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

Side by Side Diff: webkit/media/android/webmediaplayer_android.cc

Issue 13688004: Location/size change notification when external rendering is enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Put notification hook under ifdef's to minimize performance implication on other platforms Created 7 years, 8 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 (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 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 } 469 }
470 470
471 void WebMediaPlayerAndroid::SetNeedsEstablishPeer(bool needs_establish_peer) { 471 void WebMediaPlayerAndroid::SetNeedsEstablishPeer(bool needs_establish_peer) {
472 needs_establish_peer_ = needs_establish_peer; 472 needs_establish_peer_ = needs_establish_peer;
473 } 473 }
474 474
475 void WebMediaPlayerAndroid::UpdatePlayingState(bool is_playing) { 475 void WebMediaPlayerAndroid::UpdatePlayingState(bool is_playing) {
476 is_playing_ = is_playing; 476 is_playing_ = is_playing;
477 } 477 }
478 478
479 bool WebMediaPlayerAndroid::GetGeometryChange(gfx::RectF* rect) {
480 if (!video_weblayer_)
481 return false;
482
483 cc::Layer* layer = video_weblayer_->layer();
484 rect->set_size(layer->bounds());
485 while (layer) {
486 rect->Offset(layer->position().OffsetFromOrigin());
487 layer = layer->parent();
488 }
489
490 if (rect_ == *rect)
491 return false;
492
493 rect_ = *rect;
494 return true;
495 }
496
479 } // namespace webkit_media 497 } // namespace webkit_media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698