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

Side by Side Diff: chrome/browser/ui/views/native_constrained_window_win.cc

Issue 10892014: Make HWNDMessageHandler subclass WindowImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/views/frame/browser_frame_win.cc ('k') | ui/views/widget/native_widget_win.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/constrained_window_views.h" 5 #include "chrome/browser/ui/views/constrained_window_views.h"
6 6
7 #include "ui/views/widget/native_widget_win.h" 7 #include "ui/views/widget/native_widget_win.h"
8 8
9 namespace { 9 namespace {
10 bool IsNonClientHitTestCode(UINT hittest) { 10 bool IsNonClientHitTestCode(UINT hittest) {
(...skipping 16 matching lines...) Expand all
27 // Overridden from NativeConstrainedWindow: 27 // Overridden from NativeConstrainedWindow:
28 virtual views::NativeWidget* AsNativeWidget() OVERRIDE { 28 virtual views::NativeWidget* AsNativeWidget() OVERRIDE {
29 return this; 29 return this;
30 } 30 }
31 31
32 // Overridden from views::NativeWidgetWin: 32 // Overridden from views::NativeWidgetWin:
33 virtual void OnFinalMessage(HWND window) OVERRIDE { 33 virtual void OnFinalMessage(HWND window) OVERRIDE {
34 delegate_->OnNativeConstrainedWindowDestroyed(); 34 delegate_->OnNativeConstrainedWindowDestroyed();
35 NativeWidgetWin::OnFinalMessage(window); 35 NativeWidgetWin::OnFinalMessage(window);
36 } 36 }
37 virtual LRESULT OnMouseActivate(UINT message, 37 virtual bool PreHandleMSG(UINT message,
38 WPARAM w_param, 38 WPARAM w_param,
39 LPARAM l_param) OVERRIDE { 39 LPARAM l_param,
40 if (IsNonClientHitTestCode(static_cast<UINT>(LOWORD(l_param)))) 40 LRESULT* result) OVERRIDE {
41 if (message == WM_MOUSEACTIVATE &&
42 IsNonClientHitTestCode(static_cast<UINT>(LOWORD(l_param)))) {
41 delegate_->OnNativeConstrainedWindowMouseActivate(); 43 delegate_->OnNativeConstrainedWindowMouseActivate();
42 return NativeWidgetWin::OnMouseActivate(message, w_param, l_param); 44 }
45 return false;
43 } 46 }
44 47
45 NativeConstrainedWindowDelegate* delegate_; 48 NativeConstrainedWindowDelegate* delegate_;
46 49
47 DISALLOW_COPY_AND_ASSIGN(NativeConstrainedWindowWin); 50 DISALLOW_COPY_AND_ASSIGN(NativeConstrainedWindowWin);
48 }; 51 };
49 52
50 //////////////////////////////////////////////////////////////////////////////// 53 ////////////////////////////////////////////////////////////////////////////////
51 // NativeConstrainedWindow, public: 54 // NativeConstrainedWindow, public:
52 55
53 // static 56 // static
54 NativeConstrainedWindow* NativeConstrainedWindow::CreateNativeConstrainedWindow( 57 NativeConstrainedWindow* NativeConstrainedWindow::CreateNativeConstrainedWindow(
55 NativeConstrainedWindowDelegate* delegate) { 58 NativeConstrainedWindowDelegate* delegate) {
56 return new NativeConstrainedWindowWin(delegate); 59 return new NativeConstrainedWindowWin(delegate);
57 } 60 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_frame_win.cc ('k') | ui/views/widget/native_widget_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698