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

Side by Side Diff: chrome/browser/ui/views/location_bar/zoom_bubble_view.cc

Issue 12897004: Remove BubbleDelegateView::Show(); call GetWidget()->Show() instead; etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixup more BubbleDelegateView::Show() calls. Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/location_bar/zoom_bubble_view.h" 5 #include "chrome/browser/ui/views/location_bar/zoom_bubble_view.h"
6 6
7 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "chrome/browser/chrome_page_zoom.h" 8 #include "chrome/browser/chrome_page_zoom.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_finder.h" 10 #include "chrome/browser/ui/browser_finder.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 zoom_bubble_->set_parent_window( 73 zoom_bubble_->set_parent_window(
74 web_contents->GetView()->GetTopLevelNativeWindow()); 74 web_contents->GetView()->GetTopLevelNativeWindow());
75 } 75 }
76 76
77 views::BubbleDelegateView::CreateBubble(zoom_bubble_); 77 views::BubbleDelegateView::CreateBubble(zoom_bubble_);
78 78
79 // Adjust for fullscreen after creation as it relies on the content size. 79 // Adjust for fullscreen after creation as it relies on the content size.
80 if (is_fullscreen) 80 if (is_fullscreen)
81 zoom_bubble_->AdjustForFullscreen(browser_view->GetBoundsInScreen()); 81 zoom_bubble_->AdjustForFullscreen(browser_view->GetBoundsInScreen());
82 82
83 zoom_bubble_->Show(); 83 zoom_bubble_->GetWidget()->Show();
84 } 84 }
85 } 85 }
86 86
87 // static 87 // static
88 void ZoomBubbleView::CloseBubble() { 88 void ZoomBubbleView::CloseBubble() {
89 if (zoom_bubble_) 89 if (zoom_bubble_)
90 zoom_bubble_->Close(); 90 zoom_bubble_->Close();
91 } 91 }
92 92
93 // static 93 // static
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 DCHECK_EQ(type, chrome::NOTIFICATION_FULLSCREEN_CHANGED); 215 DCHECK_EQ(type, chrome::NOTIFICATION_FULLSCREEN_CHANGED);
216 CloseBubble(); 216 CloseBubble();
217 } 217 }
218 218
219 void ZoomBubbleView::WindowClosing() { 219 void ZoomBubbleView::WindowClosing() {
220 // |zoom_bubble_| can be a new bubble by this point (as Close(); doesn't 220 // |zoom_bubble_| can be a new bubble by this point (as Close(); doesn't
221 // call this right away). Only set to NULL when it's this bubble. 221 // call this right away). Only set to NULL when it's this bubble.
222 if (zoom_bubble_ == this) 222 if (zoom_bubble_ == this)
223 zoom_bubble_ = NULL; 223 zoom_bubble_ = NULL;
224 } 224 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698