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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp

Issue 2634713002: Remove PageVisibilityObserver contextDestroyed() notifications. (Closed)
Patch Set: prefer type aliases Created 3 years, 11 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 /* 1 /*
2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 1184 matching lines...) Expand 10 before | Expand all | Expand 10 after
1195 discardImageBuffer(); 1195 discardImageBuffer();
1196 } 1196 }
1197 } 1197 }
1198 } 1198 }
1199 1199
1200 void HTMLCanvasElement::contextDestroyed(ExecutionContext*) { 1200 void HTMLCanvasElement::contextDestroyed(ExecutionContext*) {
1201 if (m_context) 1201 if (m_context)
1202 m_context->stop(); 1202 m_context->stop();
1203 } 1203 }
1204 1204
1205 void HTMLCanvasElement::contextDestroyed(Page*) {}
1206
1207 void HTMLCanvasElement::styleDidChange(const ComputedStyle* oldStyle, 1205 void HTMLCanvasElement::styleDidChange(const ComputedStyle* oldStyle,
1208 const ComputedStyle& newStyle) { 1206 const ComputedStyle& newStyle) {
1209 if (m_context) 1207 if (m_context)
1210 m_context->styleDidChange(oldStyle, newStyle); 1208 m_context->styleDidChange(oldStyle, newStyle);
1211 } 1209 }
1212 1210
1213 void HTMLCanvasElement::didMoveToNewDocument(Document& oldDocument) { 1211 void HTMLCanvasElement::didMoveToNewDocument(Document& oldDocument) {
1214 ContextLifecycleObserver::setContext(&document()); 1212 ContextLifecycleObserver::setContext(&document());
1215 PageVisibilityObserver::setContext(document().page()); 1213 PageVisibilityObserver::setContext(document().page());
1216 HTMLElement::didMoveToNewDocument(oldDocument); 1214 HTMLElement::didMoveToNewDocument(oldDocument);
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
1416 m_surfaceLayerBridge = WTF::wrapUnique(new CanvasSurfaceLayerBridge(this)); 1414 m_surfaceLayerBridge = WTF::wrapUnique(new CanvasSurfaceLayerBridge(this));
1417 // Creates a placeholder layer first before Surface is created. 1415 // Creates a placeholder layer first before Surface is created.
1418 m_surfaceLayerBridge->createSolidColorLayer(); 1416 m_surfaceLayerBridge->createSolidColorLayer();
1419 } 1417 }
1420 1418
1421 void HTMLCanvasElement::OnWebLayerReplaced() { 1419 void HTMLCanvasElement::OnWebLayerReplaced() {
1422 setNeedsCompositingUpdate(); 1420 setNeedsCompositingUpdate();
1423 } 1421 }
1424 1422
1425 } // namespace blink 1423 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698