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

Side by Side Diff: content/browser/bluetooth/web_bluetooth_service_impl.cc

Issue 2716493004: Renamed NavigationHandle::IsSamePage to NavigationHandle::IsSameDocument (Closed)
Patch Set: Rebased Created 3 years, 9 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 // ID Not In Map Note: A service, characteristic, or descriptor ID not in the 5 // ID Not In Map Note: A service, characteristic, or descriptor ID not in the
6 // corresponding WebBluetoothServiceImpl map [service_id_to_device_address_, 6 // corresponding WebBluetoothServiceImpl map [service_id_to_device_address_,
7 // characteristic_id_to_service_id_, descriptor_id_to_characteristic_id_] 7 // characteristic_id_to_service_id_, descriptor_id_to_characteristic_id_]
8 // implies a hostile renderer because a renderer obtains the corresponding ID 8 // implies a hostile renderer because a renderer obtains the corresponding ID
9 // from this class and it will be added to the map at that time. 9 // from this class and it will be added to the map at that time.
10 10
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 192
193 bool WebBluetoothServiceImpl::IsDevicePaired( 193 bool WebBluetoothServiceImpl::IsDevicePaired(
194 const std::string& device_address) { 194 const std::string& device_address) {
195 return allowed_devices().GetDeviceId(device_address) != nullptr; 195 return allowed_devices().GetDeviceId(device_address) != nullptr;
196 } 196 }
197 197
198 void WebBluetoothServiceImpl::DidFinishNavigation( 198 void WebBluetoothServiceImpl::DidFinishNavigation(
199 NavigationHandle* navigation_handle) { 199 NavigationHandle* navigation_handle) {
200 if (navigation_handle->HasCommitted() && 200 if (navigation_handle->HasCommitted() &&
201 navigation_handle->GetRenderFrameHost() == render_frame_host_ && 201 navigation_handle->GetRenderFrameHost() == render_frame_host_ &&
202 !navigation_handle->IsSamePage()) { 202 !navigation_handle->IsSameDocument()) {
203 ClearState(); 203 ClearState();
204 } 204 }
205 } 205 }
206 206
207 void WebBluetoothServiceImpl::AdapterPoweredChanged( 207 void WebBluetoothServiceImpl::AdapterPoweredChanged(
208 device::BluetoothAdapter* adapter, 208 device::BluetoothAdapter* adapter,
209 bool powered) { 209 bool powered) {
210 DCHECK_CURRENTLY_ON(BrowserThread::UI); 210 DCHECK_CURRENTLY_ON(BrowserThread::UI);
211 if (device_chooser_controller_.get()) { 211 if (device_chooser_controller_.get()) {
212 device_chooser_controller_->AdapterPoweredChanged(powered); 212 device_chooser_controller_->AdapterPoweredChanged(powered);
(...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after
1207 descriptor_id_to_characteristic_id_.clear(); 1207 descriptor_id_to_characteristic_id_.clear();
1208 characteristic_id_to_service_id_.clear(); 1208 characteristic_id_to_service_id_.clear();
1209 service_id_to_device_address_.clear(); 1209 service_id_to_device_address_.clear();
1210 connected_devices_.reset( 1210 connected_devices_.reset(
1211 new FrameConnectedBluetoothDevices(render_frame_host_)); 1211 new FrameConnectedBluetoothDevices(render_frame_host_));
1212 device_chooser_controller_.reset(); 1212 device_chooser_controller_.reset();
1213 BluetoothAdapterFactoryWrapper::Get().ReleaseAdapter(this); 1213 BluetoothAdapterFactoryWrapper::Get().ReleaseAdapter(this);
1214 } 1214 }
1215 1215
1216 } // namespace content 1216 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698