| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_H_ | 5 #ifndef UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_H_ |
| 6 #define UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_H_ | 6 #define UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_H_ |
| 7 | 7 |
| 8 #include <atlbase.h> | 8 #include <atlbase.h> |
| 9 #include <atlapp.h> | 9 #include <atlapp.h> |
| 10 #include <atlmisc.h> | 10 #include <atlmisc.h> |
| 11 #include <windows.h> | 11 #include <windows.h> |
| 12 | 12 |
| 13 #include <set> | 13 #include <set> |
| 14 #include <vector> | 14 #include <vector> |
| 15 | 15 |
| 16 #include "base/basictypes.h" | 16 #include "base/basictypes.h" |
| 17 #include "base/compiler_specific.h" | 17 #include "base/compiler_specific.h" |
| 18 #include "base/memory/scoped_ptr.h" | 18 #include "base/memory/scoped_ptr.h" |
| 19 #include "base/memory/weak_ptr.h" | 19 #include "base/memory/weak_ptr.h" |
| 20 #include "base/message_loop/message_loop.h" | 20 #include "base/message_loop/message_loop.h" |
| 21 #include "base/strings/string16.h" | 21 #include "base/strings/string16.h" |
| 22 #include "base/win/win_util.h" | 22 #include "base/win/win_util.h" |
| 23 #include "ui/base/accessibility/accessibility_types.h" | 23 #include "ui/base/accessibility/accessibility_types.h" |
| 24 #include "ui/base/events/event.h" | 24 #include "ui/base/events/event.h" |
| 25 #include "ui/base/ui_base_types.h" | 25 #include "ui/base/ui_base_types.h" |
| 26 #include "ui/base/win/window_impl.h" | |
| 27 #include "ui/gfx/rect.h" | 26 #include "ui/gfx/rect.h" |
| 27 #include "ui/gfx/win/window_impl.h" |
| 28 #include "ui/views/ime/input_method_delegate.h" | 28 #include "ui/views/ime/input_method_delegate.h" |
| 29 #include "ui/views/views_export.h" | 29 #include "ui/views/views_export.h" |
| 30 | 30 |
| 31 namespace gfx { | 31 namespace gfx { |
| 32 class Canvas; | 32 class Canvas; |
| 33 class ImageSkia; | 33 class ImageSkia; |
| 34 class Insets; | 34 class Insets; |
| 35 } | 35 } |
| 36 | 36 |
| 37 namespace views { | 37 namespace views { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 51 const int WM_NCUAHDRAWCAPTION = 0xAE; | 51 const int WM_NCUAHDRAWCAPTION = 0xAE; |
| 52 const int WM_NCUAHDRAWFRAME = 0xAF; | 52 const int WM_NCUAHDRAWFRAME = 0xAF; |
| 53 | 53 |
| 54 // An object that handles messages for a HWND that implements the views | 54 // An object that handles messages for a HWND that implements the views |
| 55 // "Custom Frame" look. The purpose of this class is to isolate the windows- | 55 // "Custom Frame" look. The purpose of this class is to isolate the windows- |
| 56 // specific message handling from the code that wraps it. It is intended to be | 56 // specific message handling from the code that wraps it. It is intended to be |
| 57 // used by both a views::NativeWidget and an aura::RootWindowHost | 57 // used by both a views::NativeWidget and an aura::RootWindowHost |
| 58 // implementation. | 58 // implementation. |
| 59 // TODO(beng): This object should eventually *become* the WindowImpl. | 59 // TODO(beng): This object should eventually *become* the WindowImpl. |
| 60 class VIEWS_EXPORT HWNDMessageHandler : | 60 class VIEWS_EXPORT HWNDMessageHandler : |
| 61 public ui::WindowImpl, | 61 public gfx::WindowImpl, |
| 62 public internal::InputMethodDelegate, | 62 public internal::InputMethodDelegate, |
| 63 public base::MessageLoopForUI::Observer { | 63 public base::MessageLoopForUI::Observer { |
| 64 public: | 64 public: |
| 65 explicit HWNDMessageHandler(HWNDMessageHandlerDelegate* delegate); | 65 explicit HWNDMessageHandler(HWNDMessageHandlerDelegate* delegate); |
| 66 ~HWNDMessageHandler(); | 66 ~HWNDMessageHandler(); |
| 67 | 67 |
| 68 void Init(HWND parent, const gfx::Rect& bounds); | 68 void Init(HWND parent, const gfx::Rect& bounds); |
| 69 void InitModalType(ui::ModalType modal_type); | 69 void InitModalType(ui::ModalType modal_type); |
| 70 | 70 |
| 71 void Close(); | 71 void Close(); |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 | 474 |
| 475 // Necessary to avoid corruption on NC paint in Aero mode. | 475 // Necessary to avoid corruption on NC paint in Aero mode. |
| 476 bool did_gdi_clear_; | 476 bool did_gdi_clear_; |
| 477 | 477 |
| 478 DISALLOW_COPY_AND_ASSIGN(HWNDMessageHandler); | 478 DISALLOW_COPY_AND_ASSIGN(HWNDMessageHandler); |
| 479 }; | 479 }; |
| 480 | 480 |
| 481 } // namespace views | 481 } // namespace views |
| 482 | 482 |
| 483 #endif // UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_H_ | 483 #endif // UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_H_ |
| OLD | NEW |