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

Side by Side Diff: third_party/WebKit/Source/modules/geolocation/Geolocation.cpp

Issue 2727633006: DevTools: Rename InspectorInstrumentation:: namespace into probe:: (Closed)
Patch Set: 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 /* 1 /*
2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2009 Torch Mobile, Inc. 3 * Copyright (C) 2009 Torch Mobile, Inc.
4 * Copyright 2010, The Android Open Source Project 4 * Copyright 2010, The Android Open Source Project
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 } 173 }
174 } 174 }
175 175
176 void Geolocation::getCurrentPosition(PositionCallback* successCallback, 176 void Geolocation::getCurrentPosition(PositionCallback* successCallback,
177 PositionErrorCallback* errorCallback, 177 PositionErrorCallback* errorCallback,
178 const PositionOptions& options) { 178 const PositionOptions& options) {
179 if (!frame()) 179 if (!frame())
180 return; 180 return;
181 181
182 reportGeolocationViolation(document()); 182 reportGeolocationViolation(document());
183 InspectorInstrumentation::breakIfNeeded(document(), 183 probe::breakIfNeeded(document(), "Geolocation.getCurrentPosition");
184 "Geolocation.getCurrentPosition");
185 184
186 GeoNotifier* notifier = 185 GeoNotifier* notifier =
187 GeoNotifier::create(this, successCallback, errorCallback, options); 186 GeoNotifier::create(this, successCallback, errorCallback, options);
188 startRequest(notifier); 187 startRequest(notifier);
189 188
190 m_oneShots.insert(notifier); 189 m_oneShots.insert(notifier);
191 } 190 }
192 191
193 int Geolocation::watchPosition(PositionCallback* successCallback, 192 int Geolocation::watchPosition(PositionCallback* successCallback,
194 PositionErrorCallback* errorCallback, 193 PositionErrorCallback* errorCallback,
195 const PositionOptions& options) { 194 const PositionOptions& options) {
196 if (!frame()) 195 if (!frame())
197 return 0; 196 return 0;
198 197
199 reportGeolocationViolation(document()); 198 reportGeolocationViolation(document());
200 InspectorInstrumentation::breakIfNeeded(document(), 199 probe::breakIfNeeded(document(), "Geolocation.watchPosition");
201 "Geolocation.watchPosition");
202 200
203 GeoNotifier* notifier = 201 GeoNotifier* notifier =
204 GeoNotifier::create(this, successCallback, errorCallback, options); 202 GeoNotifier::create(this, successCallback, errorCallback, options);
205 startRequest(notifier); 203 startRequest(notifier);
206 204
207 int watchID; 205 int watchID;
208 // Keep asking for the next id until we're given one that we don't already 206 // Keep asking for the next id until we're given one that we don't already
209 // have. 207 // have.
210 do { 208 do {
211 watchID = getExecutionContext()->circularSequentialID(); 209 watchID = getExecutionContext()->circularSequentialID();
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 PositionError::kPositionUnavailable, failedToStartServiceErrorMessage); 552 PositionError::kPositionUnavailable, failedToStartServiceErrorMessage);
555 error->setIsFatal(true); 553 error->setIsFatal(true);
556 handleError(error); 554 handleError(error);
557 } 555 }
558 556
559 void Geolocation::onPermissionConnectionError() { 557 void Geolocation::onPermissionConnectionError() {
560 onGeolocationPermissionUpdated(mojom::blink::PermissionStatus::DENIED); 558 onGeolocationPermissionUpdated(mojom::blink::PermissionStatus::DENIED);
561 } 559 }
562 560
563 } // namespace blink 561 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698