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

Unified Diff: chrome/browser/views/browser_bubble_win.cc

Issue 211027: Change BrowserBubble to use Close instead of CloseNow. This should make (Closed)
Patch Set: gtk Created 11 years, 3 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/views/browser_bubble_win.cc
diff --git a/chrome/browser/views/browser_bubble_win.cc b/chrome/browser/views/browser_bubble_win.cc
index e72545bb0ed8ee5cbfecc3cba73e2ea3ad9d1fab..e1a1a06de9456b7cab1b0a34230173f12e6216b7 100644
--- a/chrome/browser/views/browser_bubble_win.cc
+++ b/chrome/browser/views/browser_bubble_win.cc
@@ -12,8 +12,8 @@
void BrowserBubble::InitPopup() {
gfx::NativeWindow native_window = frame_->GetWindow()->GetNativeWindow();
views::WidgetWin* pop = new views::WidgetWin();
- pop->set_delete_on_destroy(false);
pop->set_window_style(WS_POPUP);
+
#if 0
// TODO(erikkay) Layered windows don't draw child windows.
// Apparently there's some tricks you can do to handle that.
@@ -22,25 +22,26 @@ void BrowserBubble::InitPopup() {
l10n_util::GetExtendedTooltipStyles());
pop->SetOpacity(0xFF);
#endif
+
// A focus manager is necessary if you want to be able to handle various
// mouse events properly.
pop->Init(frame_native_view_, bounds_);
pop->SetContentsView(view_);
- popup_.reset(pop);
- Reposition();
+ popup_ = pop;
+ Reposition();
AttachToBrowser();
}
void BrowserBubble::MovePopup(int x, int y, int w, int h) {
- views::WidgetWin* pop = static_cast<views::WidgetWin*>(popup_.get());
+ views::WidgetWin* pop = static_cast<views::WidgetWin*>(popup_);
pop->MoveWindow(x, y, w, h);
}
void BrowserBubble::Show() {
if (visible_)
return;
- views::WidgetWin* pop = static_cast<views::WidgetWin*>(popup_.get());
+ views::WidgetWin* pop = static_cast<views::WidgetWin*>(popup_);
pop->Show();
visible_ = true;
}
@@ -48,7 +49,7 @@ void BrowserBubble::Show() {
void BrowserBubble::Hide() {
if (!visible_)
return;
- views::WidgetWin* pop = static_cast<views::WidgetWin*>(popup_.get());
+ views::WidgetWin* pop = static_cast<views::WidgetWin*>(popup_);
pop->Hide();
visible_ = false;
}

Powered by Google App Engine
This is Rietveld 408576698