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

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

Issue 2700263003: DevTools: normalize native breakpoint names. (Closed)
Patch Set: fixed the test 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
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sources/EventListenerBreakpointsSidebarPane.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::NativeBreakpoint nativeBreakpoint( 183 InspectorInstrumentation::NativeBreakpoint nativeBreakpoint(
184 document(), "navigator.geolocation.getCurrentPosition", true); 184 document(), "Geolocation.getCurrentPosition", true);
185 185
186 GeoNotifier* notifier = 186 GeoNotifier* notifier =
187 GeoNotifier::create(this, successCallback, errorCallback, options); 187 GeoNotifier::create(this, successCallback, errorCallback, options);
188 startRequest(notifier); 188 startRequest(notifier);
189 189
190 m_oneShots.insert(notifier); 190 m_oneShots.insert(notifier);
191 } 191 }
192 192
193 int Geolocation::watchPosition(PositionCallback* successCallback, 193 int Geolocation::watchPosition(PositionCallback* successCallback,
194 PositionErrorCallback* errorCallback, 194 PositionErrorCallback* errorCallback,
195 const PositionOptions& options) { 195 const PositionOptions& options) {
196 if (!frame()) 196 if (!frame())
197 return 0; 197 return 0;
198 198
199 reportGeolocationViolation(document()); 199 reportGeolocationViolation(document());
200 InspectorInstrumentation::NativeBreakpoint nativeBreakpoint( 200 InspectorInstrumentation::NativeBreakpoint nativeBreakpoint(
201 document(), "navigator.geolocation.watchPosition", true); 201 document(), "Geolocation.watchPosition", true);
202 202
203 GeoNotifier* notifier = 203 GeoNotifier* notifier =
204 GeoNotifier::create(this, successCallback, errorCallback, options); 204 GeoNotifier::create(this, successCallback, errorCallback, options);
205 startRequest(notifier); 205 startRequest(notifier);
206 206
207 int watchID; 207 int watchID;
208 // Keep asking for the next id until we're given one that we don't already 208 // Keep asking for the next id until we're given one that we don't already
209 // have. 209 // have.
210 do { 210 do {
211 watchID = getExecutionContext()->circularSequentialID(); 211 watchID = getExecutionContext()->circularSequentialID();
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 PositionError::kPositionUnavailable, failedToStartServiceErrorMessage); 554 PositionError::kPositionUnavailable, failedToStartServiceErrorMessage);
555 error->setIsFatal(true); 555 error->setIsFatal(true);
556 handleError(error); 556 handleError(error);
557 } 557 }
558 558
559 void Geolocation::onPermissionConnectionError() { 559 void Geolocation::onPermissionConnectionError() {
560 onGeolocationPermissionUpdated(mojom::blink::PermissionStatus::DENIED); 560 onGeolocationPermissionUpdated(mojom::blink::PermissionStatus::DENIED);
561 } 561 }
562 562
563 } // namespace blink 563 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sources/EventListenerBreakpointsSidebarPane.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698