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

Unified Diff: chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm

Issue 867183006: Revert of Allow new zoom bubble to override current one. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/zoom_decoration.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm b/chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm
index ed9b67766e4a70aba640857db600411219cbf16b..7306dd10c75c8b4cea9d06142bcf406b21529732 100644
--- a/chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm
@@ -23,7 +23,6 @@
ZoomDecoration::~ZoomDecoration() {
[bubble_ closeWithoutAnimation];
- bubble_.delegate = nil;
}
bool ZoomDecoration::UpdateIfNecessary(
@@ -49,8 +48,8 @@
}
void ZoomDecoration::ShowBubble(BOOL auto_close) {
- ZoomBubbleController* old_bubble = bubble_;
- old_bubble.delegate = nil;
+ if (bubble_)
+ return;
content::WebContents* web_contents = owner_->GetWebContents();
if (!web_contents)
@@ -69,9 +68,6 @@
bubble_ = [[ZoomBubbleController alloc] initWithParentWindow:[field window]
delegate:this];
[bubble_ showAnchoredAt:anchor autoClose:auto_close];
-
- [old_bubble.window orderOut:nil];
- [old_bubble closeWithoutAnimation];
}
void ZoomDecoration::CloseBubble() {
@@ -142,7 +138,6 @@
}
void ZoomDecoration::OnClose() {
- bubble_.delegate = nil;
bubble_ = nil;
// If the page is at default zoom then hiding the zoom decoration
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/zoom_decoration.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698