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

Side by Side Diff: Source/core/page/DOMWindow.cpp

Issue 20748002: Blob creation methods for ImageBitmap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Read blob as ArrayBuffer. Refactor into ImageBitmapFactories. Created 7 years, 4 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
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 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after
1376 d->cancelAnimationFrame(id); 1376 d->cancelAnimationFrame(id);
1377 } 1377 }
1378 1378
1379 DOMWindowCSS* DOMWindow::css() 1379 DOMWindowCSS* DOMWindow::css()
1380 { 1380 {
1381 if (!m_css) 1381 if (!m_css)
1382 m_css = DOMWindowCSS::create(); 1382 m_css = DOMWindowCSS::create();
1383 return m_css.get(); 1383 return m_css.get();
1384 } 1384 }
1385 1385
1386 void DOMWindow::loadBlobAsync(ImageBitmapLoader* loader, Blob* blob)
1387 {
1388 m_pendingImageBitmapLoaders.add(loader);
1389 loader->start(blob);
1390 }
1391
1392 void DOMWindow::finishedLoading(ImageBitmapLoader* loader)
1393 {
1394 ASSERT(m_pendingImageBitmapLoaders.contains(loader));
1395 m_pendingImageBitmapLoaders.remove(loader);
1396 }
1397
1386 static void didAddStorageEventListener(DOMWindow* window) 1398 static void didAddStorageEventListener(DOMWindow* window)
1387 { 1399 {
1388 // Creating these WebCore::Storage objects informs the system that we'd like to receive 1400 // Creating these WebCore::Storage objects informs the system that we'd like to receive
1389 // notifications about storage events that might be triggered in other proce sses. Rather 1401 // notifications about storage events that might be triggered in other proce sses. Rather
1390 // than subscribe to these notifications explicitly, we subscribe to them im plicitly to 1402 // than subscribe to these notifications explicitly, we subscribe to them im plicitly to
1391 // simplify the work done by the system. 1403 // simplify the work done by the system.
1392 window->localStorage(IGNORE_EXCEPTION_STATE); 1404 window->localStorage(IGNORE_EXCEPTION_STATE);
1393 window->sessionStorage(IGNORE_EXCEPTION_STATE); 1405 window->sessionStorage(IGNORE_EXCEPTION_STATE);
1394 } 1406 }
1395 1407
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
1717 1729
1718 Frame* child = frame->tree()->scopedChild(index); 1730 Frame* child = frame->tree()->scopedChild(index);
1719 if (child) 1731 if (child)
1720 return child->domWindow(); 1732 return child->domWindow();
1721 1733
1722 return 0; 1734 return 0;
1723 } 1735 }
1724 1736
1725 1737
1726 } // namespace WebCore 1738 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698