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

Side by Side Diff: third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.cpp

Issue 2863713002: [Media, Controls] Cleanup resize observer before dereferencing. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 // TODO(mlamouri): we hide show the controls instead of having 501 // TODO(mlamouri): we hide show the controls instead of having
502 // HTMLMediaElement do it. 502 // HTMLMediaElement do it.
503 503
504 window_event_listener_->Stop(); 504 window_event_listener_->Stop();
505 media_event_listener_->Detach(); 505 media_event_listener_->Detach();
506 if (orientation_lock_delegate_) 506 if (orientation_lock_delegate_)
507 orientation_lock_delegate_->Detach(); 507 orientation_lock_delegate_->Detach();
508 if (rotate_to_fullscreen_delegate_) 508 if (rotate_to_fullscreen_delegate_)
509 rotate_to_fullscreen_delegate_->Detach(); 509 rotate_to_fullscreen_delegate_->Detach();
510 510
511 resize_observer_.Clear(); 511 if (resize_observer_) {
512 resize_observer_->disconnect();
513 resize_observer_.Clear();
514 }
512 515
513 if (element_mutation_callback_) { 516 if (element_mutation_callback_) {
514 element_mutation_callback_->Disconnect(); 517 element_mutation_callback_->Disconnect();
515 element_mutation_callback_.Clear(); 518 element_mutation_callback_.Clear();
516 } 519 }
517 } 520 }
518 521
519 void MediaControlsImpl::Reset() { 522 void MediaControlsImpl::Reset() {
520 EventDispatchForbiddenScope::AllowUserAgentEvents allow_events_in_shadow; 523 EventDispatchForbiddenScope::AllowUserAgentEvents allow_events_in_shadow;
521 BatchedControlUpdate batch(this); 524 BatchedControlUpdate batch(this);
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after
1212 visitor->Trace(overlay_cast_button_); 1215 visitor->Trace(overlay_cast_button_);
1213 visitor->Trace(media_event_listener_); 1216 visitor->Trace(media_event_listener_);
1214 visitor->Trace(window_event_listener_); 1217 visitor->Trace(window_event_listener_);
1215 visitor->Trace(orientation_lock_delegate_); 1218 visitor->Trace(orientation_lock_delegate_);
1216 visitor->Trace(rotate_to_fullscreen_delegate_); 1219 visitor->Trace(rotate_to_fullscreen_delegate_);
1217 MediaControls::Trace(visitor); 1220 MediaControls::Trace(visitor);
1218 HTMLDivElement::Trace(visitor); 1221 HTMLDivElement::Trace(visitor);
1219 } 1222 }
1220 1223
1221 } // namespace blink 1224 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698