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 | 15 |
15 #include "base/basictypes.h" | 16 #include "base/basictypes.h" |
16 #include "base/compiler_specific.h" | 17 #include "base/compiler_specific.h" |
17 #include "base/memory/scoped_ptr.h" | 18 #include "base/memory/scoped_ptr.h" |
18 #include "base/memory/weak_ptr.h" | 19 #include "base/memory/weak_ptr.h" |
19 #include "base/message_loop/message_loop.h" | 20 #include "base/message_loop/message_loop.h" |
20 #include "base/strings/string16.h" | 21 #include "base/strings/string16.h" |
21 #include "base/win/win_util.h" | 22 #include "base/win/win_util.h" |
22 #include "ui/base/accessibility/accessibility_types.h" | 23 #include "ui/base/accessibility/accessibility_types.h" |
| 24 #include "ui/base/events/event.h" |
23 #include "ui/base/ui_base_types.h" | 25 #include "ui/base/ui_base_types.h" |
24 #include "ui/base/win/window_impl.h" | 26 #include "ui/base/win/window_impl.h" |
25 #include "ui/gfx/rect.h" | 27 #include "ui/gfx/rect.h" |
26 #include "ui/views/ime/input_method_delegate.h" | 28 #include "ui/views/ime/input_method_delegate.h" |
27 #include "ui/views/views_export.h" | 29 #include "ui/views/views_export.h" |
28 | 30 |
29 namespace gfx { | 31 namespace gfx { |
30 class Canvas; | 32 class Canvas; |
31 class ImageSkia; | 33 class ImageSkia; |
32 class Insets; | 34 class Insets; |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 LRESULT OnSetIcon(UINT size_type, HICON new_icon); | 359 LRESULT OnSetIcon(UINT size_type, HICON new_icon); |
358 LRESULT OnSetText(const wchar_t* text); | 360 LRESULT OnSetText(const wchar_t* text); |
359 void OnSettingChange(UINT flags, const wchar_t* section); | 361 void OnSettingChange(UINT flags, const wchar_t* section); |
360 void OnSize(UINT param, const CSize& size); | 362 void OnSize(UINT param, const CSize& size); |
361 void OnSysCommand(UINT notification_code, const CPoint& point); | 363 void OnSysCommand(UINT notification_code, const CPoint& point); |
362 void OnThemeChanged(); | 364 void OnThemeChanged(); |
363 LRESULT OnTouchEvent(UINT message, WPARAM w_param, LPARAM l_param); | 365 LRESULT OnTouchEvent(UINT message, WPARAM w_param, LPARAM l_param); |
364 void OnWindowPosChanging(WINDOWPOS* window_pos); | 366 void OnWindowPosChanging(WINDOWPOS* window_pos); |
365 void OnWindowPosChanged(WINDOWPOS* window_pos); | 367 void OnWindowPosChanged(WINDOWPOS* window_pos); |
366 | 368 |
| 369 typedef std::vector<ui::TouchEvent> TouchEvents; |
| 370 // Helper to handle the list of touch events passed in. We need this because |
| 371 // touch events on windows don't fire if we enter a modal loop in the context |
| 372 // of a touch event. |
| 373 void HandleTouchEvents(const TouchEvents& touch_events); |
| 374 |
367 HWNDMessageHandlerDelegate* delegate_; | 375 HWNDMessageHandlerDelegate* delegate_; |
368 | 376 |
369 scoped_ptr<FullscreenHandler> fullscreen_handler_; | 377 scoped_ptr<FullscreenHandler> fullscreen_handler_; |
370 | 378 |
371 base::WeakPtrFactory<HWNDMessageHandler> close_widget_factory_; | 379 base::WeakPtrFactory<HWNDMessageHandler> close_widget_factory_; |
372 | 380 |
373 bool remove_standard_frame_; | 381 bool remove_standard_frame_; |
374 | 382 |
375 bool use_system_default_icon_; | 383 bool use_system_default_icon_; |
376 | 384 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 // True if we are allowed to update the layered window from the DIB backing | 471 // True if we are allowed to update the layered window from the DIB backing |
464 // store if necessary. | 472 // store if necessary. |
465 bool can_update_layered_window_; | 473 bool can_update_layered_window_; |
466 | 474 |
467 // True the first time nccalc is called on a sizable widget | 475 // True the first time nccalc is called on a sizable widget |
468 bool is_first_nccalc_; | 476 bool is_first_nccalc_; |
469 | 477 |
470 // A factory used to lookup appbar autohide edges. | 478 // A factory used to lookup appbar autohide edges. |
471 base::WeakPtrFactory<HWNDMessageHandler> autohide_factory_; | 479 base::WeakPtrFactory<HWNDMessageHandler> autohide_factory_; |
472 | 480 |
| 481 // A factory that allows us to process touch events asynchronously. |
| 482 base::WeakPtrFactory<HWNDMessageHandler> touch_event_factory_; |
| 483 |
473 DISALLOW_COPY_AND_ASSIGN(HWNDMessageHandler); | 484 DISALLOW_COPY_AND_ASSIGN(HWNDMessageHandler); |
474 }; | 485 }; |
475 | 486 |
476 } // namespace views | 487 } // namespace views |
477 | 488 |
478 #endif // UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_H_ | 489 #endif // UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_H_ |
OLD | NEW |