OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
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 * | 10 * |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 m_pageOverlays.remove(index); | 105 m_pageOverlays.remove(index); |
106 return true; | 106 return true; |
107 } | 107 } |
108 | 108 |
109 void PageOverlayList::update() | 109 void PageOverlayList::update() |
110 { | 110 { |
111 for (size_t i = 0; i < m_pageOverlays.size(); ++i) | 111 for (size_t i = 0; i < m_pageOverlays.size(); ++i) |
112 m_pageOverlays[i]->update(); | 112 m_pageOverlays[i]->update(); |
113 } | 113 } |
114 | 114 |
115 void PageOverlayList::paintWebFrame(blink::GraphicsContext& gc) | 115 void PageOverlayList::paintWebFrame(GraphicsContext& gc) |
116 { | 116 { |
117 for (size_t i = 0; i < m_pageOverlays.size(); ++i) | 117 for (size_t i = 0; i < m_pageOverlays.size(); ++i) |
118 m_pageOverlays[i]->paintWebFrame(gc); | 118 m_pageOverlays[i]->paintWebFrame(gc); |
119 } | 119 } |
120 | 120 |
121 size_t PageOverlayList::find(WebPageOverlay* overlay) | 121 size_t PageOverlayList::find(WebPageOverlay* overlay) |
122 { | 122 { |
123 for (size_t i = 0; i < m_pageOverlays.size(); ++i) { | 123 for (size_t i = 0; i < m_pageOverlays.size(); ++i) { |
124 if (m_pageOverlays[i]->overlay() == overlay) | 124 if (m_pageOverlays[i]->overlay() == overlay) |
125 return i; | 125 return i; |
126 } | 126 } |
127 return WTF::kNotFound; | 127 return WTF::kNotFound; |
128 } | 128 } |
129 | 129 |
130 size_t PageOverlayList::findGraphicsLayer(blink::GraphicsLayer* layer) | 130 size_t PageOverlayList::findGraphicsLayer(GraphicsLayer* layer) |
131 { | 131 { |
132 for (size_t i = 0; i < m_pageOverlays.size(); ++i) { | 132 for (size_t i = 0; i < m_pageOverlays.size(); ++i) { |
133 if (m_pageOverlays[i]->graphicsLayer() == layer) | 133 if (m_pageOverlays[i]->graphicsLayer() == layer) |
134 return i; | 134 return i; |
135 } | 135 } |
136 return WTF::kNotFound; | 136 return WTF::kNotFound; |
137 } | 137 } |
138 | 138 |
139 } // namespace blink | 139 } // namespace blink |
OLD | NEW |