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

Side by Side Diff: aura/desktop_host_win.h

Issue 7791030: Proper MouseEvent targeting. Adds a Window method that locates a Window for a given point. (Closed) Base URL: svn://svn.chromium.org/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 | « aura/desktop_host.h ('k') | aura/desktop_host_win.cc » ('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 #ifndef AURA_DESKTOP_HOST_WIN_H_ 5 #ifndef AURA_DESKTOP_HOST_WIN_H_
6 #define AURA_DESKTOP_HOST_WIN_H_ 6 #define AURA_DESKTOP_HOST_WIN_H_
7 #pragma once 7 #pragma once
8 8
9 #include "aura/desktop_host.h" 9 #include "aura/desktop_host.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "ui/base/win/window_impl.h" 11 #include "ui/base/win/window_impl.h"
12 12
13 namespace aura { 13 namespace aura {
14 14
15 class DesktopHostWin : public DesktopHost, public ui::WindowImpl { 15 class DesktopHostWin : public DesktopHost, public ui::WindowImpl {
16 public: 16 public:
17 explicit DesktopHostWin(const gfx::Rect& bounds); 17 explicit DesktopHostWin(const gfx::Rect& bounds);
18 virtual ~DesktopHostWin(); 18 virtual ~DesktopHostWin();
19 19
20 // MessageLoop::Dispatcher: 20 // MessageLoop::Dispatcher:
21 virtual bool Dispatch(const MSG& msg); 21 virtual bool Dispatch(const MSG& msg);
22 22
23 // DesktopHost: 23 // DesktopHost:
24 virtual void SetDesktop(Desktop* desktop) OVERRIDE; 24 virtual void SetDesktop(Desktop* desktop) OVERRIDE;
25 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; 25 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
26 virtual void Show() OVERRIDE; 26 virtual void Show() OVERRIDE;
27 virtual gfx::Size GetSize() OVERRIDE; 27 virtual gfx::Size GetSize() OVERRIDE;
28 virtual void SetSize(const gfx::Size& size) OVERRIDE;
28 29
29 private: 30 private:
30 BEGIN_MSG_MAP_EX(DesktopHostWin) 31 BEGIN_MSG_MAP_EX(DesktopHostWin)
31 // Range handlers must go first! 32 // Range handlers must go first!
32 MESSAGE_RANGE_HANDLER_EX(WM_MOUSEFIRST, WM_MOUSELAST, OnMouseRange) 33 MESSAGE_RANGE_HANDLER_EX(WM_MOUSEFIRST, WM_MOUSELAST, OnMouseRange)
33 MESSAGE_RANGE_HANDLER_EX(WM_NCMOUSEMOVE, WM_NCXBUTTONDBLCLK, OnMouseRange) 34 MESSAGE_RANGE_HANDLER_EX(WM_NCMOUSEMOVE, WM_NCXBUTTONDBLCLK, OnMouseRange)
34 35
35 MSG_WM_CLOSE(OnClose) 36 MSG_WM_CLOSE(OnClose)
36 MSG_WM_PAINT(OnPaint) 37 MSG_WM_PAINT(OnPaint)
37 END_MSG_MAP() 38 END_MSG_MAP()
38 39
39 void OnClose(); 40 void OnClose();
40 LRESULT OnMouseRange(UINT message, WPARAM w_param, LPARAM l_param); 41 LRESULT OnMouseRange(UINT message, WPARAM w_param, LPARAM l_param);
41 void OnPaint(HDC dc); 42 void OnPaint(HDC dc);
42 43
43 Desktop* desktop_; 44 Desktop* desktop_;
44 45
45 DISALLOW_COPY_AND_ASSIGN(DesktopHostWin); 46 DISALLOW_COPY_AND_ASSIGN(DesktopHostWin);
46 }; 47 };
47 48
48 } // namespace aura 49 } // namespace aura
49 50
50 #endif // AURA_DESKTOP_HOST_WIN_H_ 51 #endif // AURA_DESKTOP_HOST_WIN_H_
OLDNEW
« no previous file with comments | « aura/desktop_host.h ('k') | aura/desktop_host_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698