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

Side by Side Diff: views/widget/native_widget_win.h

Issue 7753021: Remove some views depenencies from RenderWidgetHostViewWin. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 | « content/browser/renderer_host/render_widget_host_view_win.cc ('k') | no next file » | 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 #ifndef VIEWS_WIDGET_NATIVE_WIDGET_WIN_H_ 5 #ifndef VIEWS_WIDGET_NATIVE_WIDGET_WIN_H_
6 #define VIEWS_WIDGET_NATIVE_WIDGET_WIN_H_ 6 #define VIEWS_WIDGET_NATIVE_WIDGET_WIN_H_
7 #pragma once 7 #pragma once
8 8
9 #include <atlbase.h> 9 #include <atlbase.h>
10 #include <atlapp.h> 10 #include <atlapp.h>
11 #include <atlcrack.h> 11 #include <atlcrack.h>
12 #include <atlmisc.h> 12 #include <atlmisc.h>
13 13
14 #include <string> 14 #include <string>
15 #include <vector> 15 #include <vector>
16 16
17 #include "base/memory/ref_counted.h" 17 #include "base/memory/ref_counted.h"
18 #include "base/memory/scoped_ptr.h" 18 #include "base/memory/scoped_ptr.h"
19 #include "base/memory/scoped_vector.h" 19 #include "base/memory/scoped_vector.h"
20 #include "base/message_loop.h" 20 #include "base/message_loop.h"
21 #include "base/win/scoped_comptr.h" 21 #include "base/win/scoped_comptr.h"
22 #include "base/win/win_util.h"
22 #include "ui/base/win/window_impl.h" 23 #include "ui/base/win/window_impl.h"
23 #include "views/focus/focus_manager.h" 24 #include "views/focus/focus_manager.h"
24 #include "views/layout/layout_manager.h" 25 #include "views/layout/layout_manager.h"
25 #include "views/widget/native_widget_private.h" 26 #include "views/widget/native_widget_private.h"
26 27
27 namespace ui { 28 namespace ui {
28 class Compositor; 29 class Compositor;
29 class ViewProp; 30 class ViewProp;
30 } 31 }
31 32
(...skipping 13 matching lines...) Expand all
45 class NativeWidgetDelegate; 46 class NativeWidgetDelegate;
46 47
47 // This is exposed only for testing 48 // This is exposed only for testing
48 // Adjusts the value of |child_rect| if necessary to ensure that it is 49 // Adjusts the value of |child_rect| if necessary to ensure that it is
49 // completely visible within |parent_rect|. 50 // completely visible within |parent_rect|.
50 VIEWS_EXPORT void EnsureRectIsVisibleInRect(const gfx::Rect& parent_rect, 51 VIEWS_EXPORT void EnsureRectIsVisibleInRect(const gfx::Rect& parent_rect,
51 gfx::Rect* child_rect, 52 gfx::Rect* child_rect,
52 int padding); 53 int padding);
53 } // namespace internal 54 } // namespace internal
54 55
55 // A Windows message reflected from other windows. This message is sent
56 // with the following arguments:
57 // hWnd - Target window
58 // uMsg - kReflectedMessage
59 // wParam - Should be 0
60 // lParam - Pointer to MSG struct containing the original message.
61 const int kReflectedMessage = WM_APP + 3;
62
63 // These two messages aren't defined in winuser.h, but they are sent to windows 56 // These two messages aren't defined in winuser.h, but they are sent to windows
64 // with captions. They appear to paint the window caption and frame. 57 // with captions. They appear to paint the window caption and frame.
65 // Unfortunately if you override the standard non-client rendering as we do 58 // Unfortunately if you override the standard non-client rendering as we do
66 // with CustomFrameWindow, sometimes Windows (not deterministically 59 // with CustomFrameWindow, sometimes Windows (not deterministically
67 // reproducibly but definitely frequently) will send these messages to the 60 // reproducibly but definitely frequently) will send these messages to the
68 // window and paint the standard caption/title over the top of the custom one. 61 // window and paint the standard caption/title over the top of the custom one.
69 // So we need to handle these messages in CustomFrameWindow to prevent this 62 // So we need to handle these messages in CustomFrameWindow to prevent this
70 // from happening. 63 // from happening.
71 const int WM_NCUAHDRAWCAPTION = 0xAE; 64 const int WM_NCUAHDRAWCAPTION = 0xAE;
72 const int WM_NCUAHDRAWFRAME = 0xAF; 65 const int WM_NCUAHDRAWFRAME = 0xAF;
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 LPARAM l_param) OVERRIDE; 282 LPARAM l_param) OVERRIDE;
290 283
291 // Message Handlers ---------------------------------------------------------- 284 // Message Handlers ----------------------------------------------------------
292 285
293 BEGIN_MSG_MAP_EX(NativeWidgetWin) 286 BEGIN_MSG_MAP_EX(NativeWidgetWin)
294 // Range handlers must go first! 287 // Range handlers must go first!
295 MESSAGE_RANGE_HANDLER_EX(WM_MOUSEFIRST, WM_MOUSELAST, OnMouseRange) 288 MESSAGE_RANGE_HANDLER_EX(WM_MOUSEFIRST, WM_MOUSELAST, OnMouseRange)
296 MESSAGE_RANGE_HANDLER_EX(WM_NCMOUSEMOVE, WM_NCXBUTTONDBLCLK, OnMouseRange) 289 MESSAGE_RANGE_HANDLER_EX(WM_NCMOUSEMOVE, WM_NCXBUTTONDBLCLK, OnMouseRange)
297 290
298 // Reflected message handler 291 // Reflected message handler
299 MESSAGE_HANDLER_EX(kReflectedMessage, OnReflectedMessage) 292 MESSAGE_HANDLER_EX(base::win::kReflectedMessage, OnReflectedMessage)
300 293
301 // CustomFrameWindow hacks 294 // CustomFrameWindow hacks
302 MESSAGE_HANDLER_EX(WM_NCUAHDRAWCAPTION, OnNCUAHDrawCaption) 295 MESSAGE_HANDLER_EX(WM_NCUAHDRAWCAPTION, OnNCUAHDrawCaption)
303 MESSAGE_HANDLER_EX(WM_NCUAHDRAWFRAME, OnNCUAHDrawFrame) 296 MESSAGE_HANDLER_EX(WM_NCUAHDRAWFRAME, OnNCUAHDrawFrame)
304 297
305 // Vista and newer 298 // Vista and newer
306 MESSAGE_HANDLER_EX(WM_DWMCOMPOSITIONCHANGED, OnDwmCompositionChanged) 299 MESSAGE_HANDLER_EX(WM_DWMCOMPOSITIONCHANGED, OnDwmCompositionChanged)
307 300
308 // Non-atlcrack.h handlers 301 // Non-atlcrack.h handlers
309 MESSAGE_HANDLER_EX(WM_GETOBJECT, OnGetObject) 302 MESSAGE_HANDLER_EX(WM_GETOBJECT, OnGetObject)
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 643
651 // The compositor for accelerated drawing. 644 // The compositor for accelerated drawing.
652 scoped_refptr<ui::Compositor> compositor_; 645 scoped_refptr<ui::Compositor> compositor_;
653 646
654 DISALLOW_COPY_AND_ASSIGN(NativeWidgetWin); 647 DISALLOW_COPY_AND_ASSIGN(NativeWidgetWin);
655 }; 648 };
656 649
657 } // namespace views 650 } // namespace views
658 651
659 #endif // VIEWS_WIDGET_NATIVE_WIDGET_WIN_H_ 652 #endif // VIEWS_WIDGET_NATIVE_WIDGET_WIN_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698