96 lines
3.4 KiB
Diff
96 lines
3.4 KiB
Diff
Index: desktop_aura/desktop_root_window_host_win.cc
|
|
===================================================================
|
|
--- desktop_aura/desktop_root_window_host_win.cc (revision 258314)
|
|
+++ desktop_aura/desktop_root_window_host_win.cc (working copy)
|
|
@@ -132,7 +132,9 @@
|
|
native_widget_delegate_);
|
|
|
|
HWND parent_hwnd = NULL;
|
|
- if (params.parent && params.parent->GetDispatcher()) {
|
|
+ if (params.parent_widget) {
|
|
+ parent_hwnd = params.parent_widget;
|
|
+ } else if (params.parent && params.parent->GetDispatcher()) {
|
|
parent_hwnd =
|
|
params.parent->GetDispatcher()->host()->GetAcceleratedWidget();
|
|
}
|
|
@@ -757,7 +759,7 @@
|
|
|
|
void DesktopRootWindowHostWin::HandleCreate() {
|
|
// TODO(beng): moar
|
|
- NOTIMPLEMENTED();
|
|
+ // NOTIMPLEMENTED();
|
|
|
|
native_widget_delegate_->OnNativeWidgetCreated(true);
|
|
|
|
Index: desktop_aura/desktop_root_window_host_win.h
|
|
===================================================================
|
|
--- desktop_aura/desktop_root_window_host_win.h (revision 258314)
|
|
+++ desktop_aura/desktop_root_window_host_win.h (working copy)
|
|
@@ -210,6 +210,7 @@
|
|
LPARAM l_param) OVERRIDE;
|
|
virtual bool HandleScrollEvent(const ui::ScrollEvent& event) OVERRIDE;
|
|
|
|
+ public:
|
|
Widget* GetWidget();
|
|
const Widget* GetWidget() const;
|
|
HWND GetHWND() const;
|
|
Index: desktop_aura/desktop_screen_win.cc
|
|
===================================================================
|
|
--- desktop_aura/desktop_screen_win.cc (revision 258314)
|
|
+++ desktop_aura/desktop_screen_win.cc (working copy)
|
|
@@ -54,6 +54,8 @@
|
|
}
|
|
|
|
HWND DesktopScreenWin::GetHWNDFromNativeView(gfx::NativeView window) const {
|
|
+ if (!window)
|
|
+ return NULL;
|
|
aura::WindowEventDispatcher* dispatcher = window->GetDispatcher();
|
|
return dispatcher ? dispatcher->host()->GetAcceleratedWidget() : NULL;
|
|
}
|
|
Index: widget.cc
|
|
===================================================================
|
|
--- widget.cc (revision 258314)
|
|
+++ widget.cc (working copy)
|
|
@@ -126,6 +126,7 @@
|
|
show_state(ui::SHOW_STATE_DEFAULT),
|
|
double_buffer(false),
|
|
parent(NULL),
|
|
+ parent_widget(NULL),
|
|
native_widget(NULL),
|
|
desktop_root_window_host(NULL),
|
|
top_level(false),
|
|
@@ -153,6 +154,7 @@
|
|
show_state(ui::SHOW_STATE_DEFAULT),
|
|
double_buffer(false),
|
|
parent(NULL),
|
|
+ parent_widget(NULL),
|
|
native_widget(NULL),
|
|
desktop_root_window_host(NULL),
|
|
top_level(false),
|
|
@@ -395,7 +397,12 @@
|
|
Minimize();
|
|
} else if (params.delegate) {
|
|
SetContentsView(params.delegate->GetContentsView());
|
|
- SetInitialBoundsForFramelessWindow(params.bounds);
|
|
+ if (params.parent_widget) {
|
|
+ // Set the bounds directly instead of applying an inset.
|
|
+ SetBounds(params.bounds);
|
|
+ } else {
|
|
+ SetInitialBoundsForFramelessWindow(params.bounds);
|
|
+ }
|
|
}
|
|
native_widget_initialized_ = true;
|
|
}
|
|
Index: widget.h
|
|
===================================================================
|
|
--- widget.h (revision 258314)
|
|
+++ widget.h (working copy)
|
|
@@ -201,6 +201,7 @@
|
|
// Should the widget be double buffered? Default is false.
|
|
bool double_buffer;
|
|
gfx::NativeView parent;
|
|
+ gfx::AcceleratedWidget parent_widget;
|
|
// Specifies the initial bounds of the Widget. Default is empty, which means
|
|
// the NativeWidget may specify a default size. If the parent is specified,
|
|
// |bounds| is in the parent's coordinate system. If the parent is not
|