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

Unified Diff: ui/views/widget/widget_message_filter.h

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/widget_hwnd_utils.cc ('k') | ui/views/widget/widget_message_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/widget_message_filter.h
===================================================================
--- ui/views/widget/widget_message_filter.h (revision 0)
+++ ui/views/widget/widget_message_filter.h (revision 0)
@@ -0,0 +1,59 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_VIEWS_WIDGET_WIDGET_MESSAGE_FILTER_H_
+#define UI_VIEWS_WIDGET_WIDGET_MESSAGE_FILTER_H_
+#pragma once
+
+#include "ui/base/win/hwnd_subclass.h"
+
+namespace aura {
+class RootWindow;
+}
+
+namespace gfx {
+class Insets;
+}
+
+namespace views {
+
+class Widget;
+
+// A message filter that implements a custom frame look for views Widgets.
+class WidgetMessageFilter : public ui::HWNDMessageFilter {
+ public:
+ WidgetMessageFilter(aura::RootWindow* root_window, Widget* widget);
+ virtual ~WidgetMessageFilter();
+
+ private:
+ // Overridden from ui::HWNDMessageFilter:
+ virtual bool FilterMessage(HWND hwnd,
+ UINT message,
+ WPARAM w_param,
+ LPARAM l_param,
+ LRESULT* l_result) OVERRIDE;
+
+ // Message handlers.
+ bool OnNCCalcSize(WPARAM w_param, LPARAM l_param, LRESULT* l_result);
+ bool OnNCHitTest(int x, int y, LRESULT* l_result);
+ bool OnNCPaint(HRGN update_region);
+ void OnSize();
+ void OnWindowPosChanged(WINDOWPOS* window_pos);
+
+ // TODO(beng): Lift documentation from NativeWidgetWin.
+ gfx::Insets GetClientAreaInsets() const;
+ bool WidgetSizeIsClientSize() const;
+ void ClientAreaSizeChanged();
+ void ResetWindowRegion(bool force);
+
+ aura::RootWindow* root_window_;
+ Widget* widget_;
+ HWND hwnd_;
+
+ DISALLOW_COPY_AND_ASSIGN(WidgetMessageFilter);
+};
+
+} // namespace views
+
+#endif // UI_VIEWS_WIDGET_WIDGET_MESSAGE_FILTER_H_
Property changes on: ui\views\widget\widget_message_filter.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « ui/views/widget/widget_hwnd_utils.cc ('k') | ui/views/widget/widget_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698