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

Side by Side Diff: third_party/WebKit/Source/modules/presentation/PresentationController.cpp

Issue 2657443005: Migrate WTF::HashSet::add() to ::insert() [part 1 of N] (Closed)
Patch Set: Created 3 years, 10 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/presentation/PresentationController.h" 5 #include "modules/presentation/PresentationController.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/frame/LocalFrame.h" 8 #include "core/frame/LocalFrame.h"
9 #include "modules/presentation/PresentationConnection.h" 9 #include "modules/presentation/PresentationConnection.h"
10 #include "public/platform/WebString.h" 10 #include "public/platform/WebString.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 for (size_t i = 0; i < urls.size(); ++i) { 125 for (size_t i = 0; i < urls.size(); ++i) {
126 if (urls[i].isValid()) 126 if (urls[i].isValid())
127 presentationUrls[i] = urls[i]; 127 presentationUrls[i] = urls[i];
128 } 128 }
129 129
130 m_client->setDefaultPresentationUrls(presentationUrls); 130 m_client->setDefaultPresentationUrls(presentationUrls);
131 } 131 }
132 132
133 void PresentationController::registerConnection( 133 void PresentationController::registerConnection(
134 PresentationConnection* connection) { 134 PresentationConnection* connection) {
135 m_connections.add(connection); 135 m_connections.insert(connection);
136 } 136 }
137 137
138 void PresentationController::contextDestroyed(ExecutionContext*) { 138 void PresentationController::contextDestroyed(ExecutionContext*) {
139 if (m_client) { 139 if (m_client) {
140 m_client->setController(nullptr); 140 m_client->setController(nullptr);
141 m_client = nullptr; 141 m_client = nullptr;
142 } 142 }
143 } 143 }
144 144
145 PresentationConnection* PresentationController::findExistingConnection( 145 PresentationConnection* PresentationController::findExistingConnection(
(...skipping 15 matching lines...) Expand all
161 const WebPresentationSessionInfo& sessionInfo) { 161 const WebPresentationSessionInfo& sessionInfo) {
162 for (const auto& connection : m_connections) { 162 for (const auto& connection : m_connections) {
163 if (connection->matches(sessionInfo)) 163 if (connection->matches(sessionInfo))
164 return connection.get(); 164 return connection.get();
165 } 165 }
166 166
167 return nullptr; 167 return nullptr;
168 } 168 }
169 169
170 } // namespace blink 170 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698