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

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

Issue 119103: Part 1 of dragging extensions on the shelf. This part was just about getting... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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/views/browser_bubble.cc ('k') | chrome/browser/views/frame/browser_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/browser_bubble_win.cc
===================================================================
--- chrome/browser/views/browser_bubble_win.cc (revision 17478)
+++ chrome/browser/views/browser_bubble_win.cc (working copy)
@@ -10,35 +10,30 @@
#include "views/window/window.h"
void BrowserBubble::InitPopup() {
- gfx::NativeView native_view = frame_->GetNativeView();
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.
+ // Do the research so we can use this.
pop->set_window_ex_style(WS_EX_LAYERED |
- WS_EX_TOOLWINDOW |
l10n_util::GetExtendedTooltipStyles());
pop->SetOpacity(0xFF);
- pop->Init(native_view, bounds_, false);
+#endif
+ // A focus manager is necessary if you want to be able to handle various
+ // mouse events properly.
+ pop->Init(frame_native_view_,
+ bounds_,
+ true); // Give the widget a focus manager.
pop->SetContentsView(view_);
popup_.reset(pop);
Reposition();
- BrowserView* browser_view =
- BrowserView::GetBrowserViewForNativeWindow(native_window);
- DCHECK(browser_view);
- if (browser_view)
- browser_view->AttachBrowserBubble(this);
+ AttachToBrowser();
}
-void BrowserBubble::DestroyPopup() {
- gfx::NativeWindow native_window = frame_->GetWindow()->GetNativeWindow();
- BrowserView* browser_view =
- BrowserView::GetBrowserViewForNativeWindow(native_window);
- if (browser_view)
- browser_view->DetachBrowserBubble(this);
-}
-
void BrowserBubble::MovePopup(int x, int y, int w, int h) {
views::WidgetWin* pop = static_cast<views::WidgetWin*>(popup_.get());
pop->MoveWindow(x, y, w, h);
« no previous file with comments | « chrome/browser/views/browser_bubble.cc ('k') | chrome/browser/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698