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

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

Issue 2629593004: Disambiguate LifecycleObserver::contextDestroyed (Closed)
Patch Set: temp Created 3 years, 11 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 } 107 }
108 108
109 Document* Geolocation::document() const { 109 Document* Geolocation::document() const {
110 return toDocument(getExecutionContext()); 110 return toDocument(getExecutionContext());
111 } 111 }
112 112
113 LocalFrame* Geolocation::frame() const { 113 LocalFrame* Geolocation::frame() const {
114 return document() ? document()->frame() : 0; 114 return document() ? document()->frame() : 0;
115 } 115 }
116 116
117 void Geolocation::contextDestroyed() { 117 void Geolocation::contextDestroyed(ExecutionContext*) {
118 m_permissionService.reset(); 118 m_permissionService.reset();
119 cancelAllRequests(); 119 cancelAllRequests();
120 stopUpdating(); 120 stopUpdating();
121 m_geolocationPermission = PermissionDenied; 121 m_geolocationPermission = PermissionDenied;
122 m_pendingForPermissionNotifiers.clear(); 122 m_pendingForPermissionNotifiers.clear();
123 m_lastPosition = nullptr; 123 m_lastPosition = nullptr;
124 } 124 }
125 125
126 void Geolocation::contextDestroyed(Page*) {}
127
126 void Geolocation::recordOriginTypeAccess() const { 128 void Geolocation::recordOriginTypeAccess() const {
127 DCHECK(frame()); 129 DCHECK(frame());
128 130
129 Document* document = this->document(); 131 Document* document = this->document();
130 DCHECK(document); 132 DCHECK(document);
131 133
132 // It is required by isSecureContext() but isn't 134 // It is required by isSecureContext() but isn't
133 // actually used. This could be used later if a warning is shown in the 135 // actually used. This could be used later if a warning is shown in the
134 // developer console. 136 // developer console.
135 String insecureOriginMsg; 137 String insecureOriginMsg;
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 // be called. In that case, blink has already shut down so do nothing. 548 // be called. In that case, blink has already shut down so do nothing.
547 // 549 //
548 // TODO(sammc): Remove this once renderer shutdown is no longer graceful. 550 // TODO(sammc): Remove this once renderer shutdown is no longer graceful.
549 if (!Platform::current()) 551 if (!Platform::current())
550 return; 552 return;
551 553
552 onGeolocationPermissionUpdated(mojom::blink::PermissionStatus::DENIED); 554 onGeolocationPermissionUpdated(mojom::blink::PermissionStatus::DENIED);
553 } 555 }
554 556
555 } // namespace blink 557 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698