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

Side by Side Diff: Source/WebCore/page/Geolocation.cpp

Issue 7398018: Merge 90914 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/782/
Patch Set: Created 9 years, 5 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 | « Source/WebCore/page/Geolocation.h ('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 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008, 2009 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 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 void Geolocation::resume() 435 void Geolocation::resume()
436 { 436 {
437 #if !ENABLE(CLIENT_BASED_GEOLOCATION) 437 #if !ENABLE(CLIENT_BASED_GEOLOCATION)
438 if (hasListeners()) 438 if (hasListeners())
439 m_service->resume(); 439 m_service->resume();
440 #endif 440 #endif
441 } 441 }
442 442
443 void Geolocation::setIsAllowed(bool allowed) 443 void Geolocation::setIsAllowed(bool allowed)
444 { 444 {
445 // Protect the Geolocation object from garbage collection during a callback.
446 RefPtr<Geolocation> protect(this);
447
445 // This may be due to either a new position from the service, or a cached 448 // This may be due to either a new position from the service, or a cached
446 // position. 449 // position.
447 m_allowGeolocation = allowed ? Yes : No; 450 m_allowGeolocation = allowed ? Yes : No;
448 451
449 #if USE(PREEMPT_GEOLOCATION_PERMISSION) 452 #if USE(PREEMPT_GEOLOCATION_PERMISSION)
450 // Permission request was made during the startRequest process 453 // Permission request was made during the startRequest process
451 if (!m_pendingForPermissionNotifiers.isEmpty()) { 454 if (!m_pendingForPermissionNotifiers.isEmpty()) {
452 handlePendingPermissionNotifiers(); 455 handlePendingPermissionNotifiers();
453 m_pendingForPermissionNotifiers.clear(); 456 m_pendingForPermissionNotifiers.clear();
454 return; 457 return;
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 764
762 Geolocation::Geolocation(Frame*) {} 765 Geolocation::Geolocation(Frame*) {}
763 766
764 Geolocation::~Geolocation() {} 767 Geolocation::~Geolocation() {}
765 768
766 void Geolocation::setIsAllowed(bool) {} 769 void Geolocation::setIsAllowed(bool) {}
767 770
768 } 771 }
769 772
770 #endif // ENABLE(GEOLOCATION) 773 #endif // ENABLE(GEOLOCATION)
OLDNEW
« no previous file with comments | « Source/WebCore/page/Geolocation.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698