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

Side by Side Diff: Source/core/html/track/vtt/VTTRegionList.cpp

Issue 244493002: Oilpan: add transition types to track interface objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add crbug.com/365260 crashing test + expectation Created 6 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 return 0; 51 return 0;
52 52
53 for (size_t i = 0; i < m_list.size(); ++i) { 53 for (size_t i = 0; i < m_list.size(); ++i) {
54 if (m_list[i]->id() == id) 54 if (m_list[i]->id() == id)
55 return m_list[i].get(); 55 return m_list[i].get();
56 } 56 }
57 57
58 return 0; 58 return 0;
59 } 59 }
60 60
61 void VTTRegionList::add(PassRefPtr<VTTRegion> region) 61 void VTTRegionList::add(PassRefPtrWillBeRawPtr<VTTRegion> region)
62 { 62 {
63 m_list.append(region); 63 m_list.append(region);
64 } 64 }
65 65
66 bool VTTRegionList::remove(VTTRegion* region) 66 bool VTTRegionList::remove(VTTRegion* region)
67 { 67 {
68 size_t index = m_list.find(region); 68 size_t index = m_list.find(region);
69 if (index == kNotFound) 69 if (index == kNotFound)
70 return false; 70 return false;
71 71
72 m_list.remove(index); 72 m_list.remove(index);
73 return true; 73 return true;
74 } 74 }
75 75
76 void VTTRegionList::clear() 76 void VTTRegionList::trace(Visitor* visitor)
77 { 77 {
78 m_list.clear(); 78 visitor->trace(m_list);
79 } 79 }
80 80
81 } // namespace WebCore 81 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/track/vtt/VTTRegionList.h ('k') | Source/core/html/track/vtt/VTTRegionList.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698