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

Unified Diff: chrome/browser/ui/zoom/zoom_controller.cc

Issue 377423002: Make ChromeAutofillClient a ZoomObserver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make ChromeAutofillClient responsible for adding itself as a ZoomObserver. Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/zoom/zoom_controller.cc
diff --git a/chrome/browser/ui/zoom/zoom_controller.cc b/chrome/browser/ui/zoom/zoom_controller.cc
index 0e4db31c771ca8a4f0e3a31b87ec5f42376ff495..0af058013d62f652c53da2d0adc55018169df18b 100644
--- a/chrome/browser/ui/zoom/zoom_controller.cc
+++ b/chrome/browser/ui/zoom/zoom_controller.cc
@@ -256,6 +256,12 @@ void ZoomController::DidNavigateMainFrame(
UpdateState(std::string());
}
+void ZoomController::WebContentsDestroyed() {
+ // At this point we should no longer be sending any zoom events with this
+ // WebContents.
+ observers_.Clear();
+}
+
void ZoomController::OnZoomLevelChanged(
const content::HostZoomMap::ZoomLevelChange& change) {
UpdateState(change.host);

Powered by Google App Engine
This is Rietveld 408576698