| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 } | 44 } |
| 45 | 45 |
| 46 GeolocationIdMap m_geolocationIdMap; | 46 GeolocationIdMap m_geolocationIdMap; |
| 47 IdGeolocationMap m_idGeolocationMap; | 47 IdGeolocationMap m_idGeolocationMap; |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 int WebGeolocationPermissionRequestManager::add(const WebGeolocationPermissionRe
quest& permissionRequest) | 50 int WebGeolocationPermissionRequestManager::add(const WebGeolocationPermissionRe
quest& permissionRequest) |
| 51 { | 51 { |
| 52 Geolocation* geolocation = permissionRequest.geolocation(); | 52 Geolocation* geolocation = permissionRequest.geolocation(); |
| 53 WebGeolocationPermissionRequestManagerPrivate* manager = ensureManager(); | 53 WebGeolocationPermissionRequestManagerPrivate* manager = ensureManager(); |
| 54 ASSERT(!manager->m_geolocationIdMap.contains(geolocation)); | 54 DCHECK(!manager->m_geolocationIdMap.contains(geolocation)); |
| 55 static int lastId; | 55 static int lastId; |
| 56 int id = ++lastId; | 56 int id = ++lastId; |
| 57 manager->m_geolocationIdMap.add(geolocation, id); | 57 manager->m_geolocationIdMap.add(geolocation, id); |
| 58 manager->m_idGeolocationMap.add(id, geolocation); | 58 manager->m_idGeolocationMap.add(id, geolocation); |
| 59 return id; | 59 return id; |
| 60 } | 60 } |
| 61 | 61 |
| 62 bool WebGeolocationPermissionRequestManager::remove(const WebGeolocationPermissi
onRequest& permissionRequest, int& id) | 62 bool WebGeolocationPermissionRequestManager::remove(const WebGeolocationPermissi
onRequest& permissionRequest, int& id) |
| 63 { | 63 { |
| 64 Geolocation* geolocation = permissionRequest.geolocation(); | 64 Geolocation* geolocation = permissionRequest.geolocation(); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 92 | 92 |
| 93 return m_private.get(); | 93 return m_private.get(); |
| 94 } | 94 } |
| 95 | 95 |
| 96 void WebGeolocationPermissionRequestManager::reset() | 96 void WebGeolocationPermissionRequestManager::reset() |
| 97 { | 97 { |
| 98 m_private.reset(); | 98 m_private.reset(); |
| 99 } | 99 } |
| 100 | 100 |
| 101 } // namespace blink | 101 } // namespace blink |
| OLD | NEW |