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

Unified Diff: ui/views/widget/desktop_native_widget_helper_aura.cc

Issue 10270002: Get the custom frame limping with win-aura. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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 | « ui/views/widget/desktop_native_widget_helper_aura.h ('k') | ui/views/widget/native_widget_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/desktop_native_widget_helper_aura.cc
===================================================================
--- ui/views/widget/desktop_native_widget_helper_aura.cc (revision 134532)
+++ ui/views/widget/desktop_native_widget_helper_aura.cc (working copy)
@@ -4,13 +4,18 @@
#include "ui/views/widget/desktop_native_widget_helper_aura.h"
-#include "ui/views/widget/native_widget_aura.h"
#include "ui/aura/root_window.h"
#include "ui/aura/desktop/desktop_activation_client.h"
#include "ui/aura/desktop/desktop_dispatcher_client.h"
#include "ui/aura/desktop/desktop_root_window_event_filter.h"
#include "ui/aura/client/dispatcher_client.h"
+#include "ui/views/widget/native_widget_aura.h"
+#if defined(OS_WIN)
+#include "ui/base/win/hwnd_subclass.h"
+#include "ui/views/widget/widget_message_filter.h"
+#endif
+
namespace views {
DesktopNativeWidgetHelperAura::DesktopNativeWidgetHelperAura(
@@ -29,6 +34,7 @@
bounds.set_size(gfx::Size(100, 100));
}
root_window_.reset(new aura::RootWindow(bounds));
+ root_window_->Init();
root_window_->SetEventFilter(
new aura::DesktopRootWindowEventFilter(root_window_.get()));
root_window_->AddRootWindowObserver(this);
@@ -40,6 +46,14 @@
new aura::DesktopDispatcherClient);
}
+void DesktopNativeWidgetHelperAura::PostInitialize() {
+#if defined(OS_WIN)
+ subclass_.reset(new ui::HWNDSubclass(root_window_->GetAcceleratedWidget()));
+ subclass_->SetFilter(new WidgetMessageFilter(root_window_.get(),
+ widget_->GetWidget()));
+#endif
+}
+
void DesktopNativeWidgetHelperAura::ShowRootWindow() {
if (root_window_.get())
root_window_->ShowRootWindow();
« no previous file with comments | « ui/views/widget/desktop_native_widget_helper_aura.h ('k') | ui/views/widget/native_widget_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698