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 CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_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 #include <peninputpanel.h> | 13 #include <peninputpanel.h> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "base/compiler_specific.h" | 16 #include "base/compiler_specific.h" |
17 #include "base/memory/scoped_ptr.h" | 17 #include "base/memory/scoped_ptr.h" |
18 #include "base/memory/scoped_vector.h" | 18 #include "base/memory/scoped_vector.h" |
19 #include "base/memory/weak_ptr.h" | 19 #include "base/memory/weak_ptr.h" |
20 #include "base/time.h" | 20 #include "base/time.h" |
21 #include "base/win/scoped_comptr.h" | 21 #include "base/win/scoped_comptr.h" |
22 #include "content/browser/accessibility/browser_accessibility_manager.h" | 22 #include "content/browser/accessibility/browser_accessibility_manager.h" |
23 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 23 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
24 #include "content/common/content_export.h" | 24 #include "content/common/content_export.h" |
25 #include "content/public/browser/notification_observer.h" | 25 #include "content/public/browser/notification_observer.h" |
26 #include "content/public/browser/notification_registrar.h" | 26 #include "content/public/browser/notification_registrar.h" |
27 #include "ui/base/gestures/gesture_recognizer.h" | |
28 #include "ui/base/gestures/gesture_types.h" | |
27 #include "ui/base/win/ime_input.h" | 29 #include "ui/base/win/ime_input.h" |
28 #include "ui/gfx/native_widget_types.h" | 30 #include "ui/gfx/native_widget_types.h" |
29 #include "ui/gfx/point.h" | 31 #include "ui/gfx/point.h" |
30 #include "ui/gfx/surface/accelerated_surface_win.h" | 32 #include "ui/gfx/surface/accelerated_surface_win.h" |
31 #include "ui/gfx/sys_color_change_listener.h" | 33 #include "ui/gfx/sys_color_change_listener.h" |
32 #include "webkit/glue/webcursor.h" | 34 #include "webkit/glue/webcursor.h" |
33 | 35 |
34 class BackingStore; | 36 class BackingStore; |
35 class SkRegion; | 37 class SkRegion; |
36 | 38 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
87 // references to it must become NULL." | 89 // references to it must become NULL." |
88 // | 90 // |
89 // RenderWidgetHostView class hierarchy described in render_widget_host_view.h. | 91 // RenderWidgetHostView class hierarchy described in render_widget_host_view.h. |
90 class RenderWidgetHostViewWin | 92 class RenderWidgetHostViewWin |
91 : public CWindowImpl<RenderWidgetHostViewWin, | 93 : public CWindowImpl<RenderWidgetHostViewWin, |
92 CWindow, | 94 CWindow, |
93 RenderWidgetHostHWNDTraits>, | 95 RenderWidgetHostHWNDTraits>, |
94 public content::RenderWidgetHostViewBase, | 96 public content::RenderWidgetHostViewBase, |
95 public content::NotificationObserver, | 97 public content::NotificationObserver, |
96 public BrowserAccessibilityDelegate, | 98 public BrowserAccessibilityDelegate, |
97 public gfx::SysColorChangeListener { | 99 public gfx::SysColorChangeListener, |
100 public ui::GestureEventHelper { | |
98 public: | 101 public: |
99 virtual ~RenderWidgetHostViewWin(); | 102 virtual ~RenderWidgetHostViewWin(); |
100 | 103 |
101 CONTENT_EXPORT void CreateWnd(HWND parent); | 104 CONTENT_EXPORT void CreateWnd(HWND parent); |
102 | 105 |
103 void ScheduleComposite(); | 106 void ScheduleComposite(); |
104 | 107 |
105 DECLARE_WND_CLASS_EX(kRenderWidgetHostHWNDClass, CS_DBLCLKS, 0); | 108 DECLARE_WND_CLASS_EX(kRenderWidgetHostHWNDClass, CS_DBLCLKS, 0); |
106 | 109 |
107 BEGIN_MSG_MAP(RenderWidgetHostHWND) | 110 BEGIN_MSG_MAP(RenderWidgetHostHWND) |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
462 | 465 |
463 WebKit::WebTouchEvent touch_event_; | 466 WebKit::WebTouchEvent touch_event_; |
464 const CWindowImpl* const window_; | 467 const CWindowImpl* const window_; |
465 }; | 468 }; |
466 | 469 |
467 // The touch-state. Its touch-points are updated as necessary. A new | 470 // The touch-state. Its touch-points are updated as necessary. A new |
468 // touch-point is added from an TOUCHEVENTF_DOWN message, and a touch-point | 471 // touch-point is added from an TOUCHEVENTF_DOWN message, and a touch-point |
469 // is removed from the list on an TOUCHEVENTF_UP message. | 472 // is removed from the list on an TOUCHEVENTF_UP message. |
470 WebTouchState touch_state_; | 473 WebTouchState touch_state_; |
471 | 474 |
475 // Overridden from ui::GestureEventHelper. | |
sky
2012/05/03 22:39:19
Move these right beneath
virtual void OnSysColorCh
| |
476 virtual ui::GestureEvent* CreateGestureEvent(ui::EventType type, | |
477 const gfx::Point& location, | |
478 int flags, | |
479 const base::Time time, | |
480 float param_first, | |
481 float param_second, | |
482 unsigned int touch_id_bitfield) OVERRIDE; | |
483 virtual ui::TouchEvent* CreateTouchEvent(ui::EventType type, | |
484 const gfx::Point& location, | |
485 int touch_id, | |
486 base::TimeDelta time_stamp) OVERRIDE; | |
487 virtual bool DispatchLongPressGestureEvent(ui::GestureEvent* event) OVERRIDE; | |
488 virtual bool DispatchCancelTouchEvent(ui::TouchEvent* event) OVERRIDE; | |
489 | |
490 scoped_ptr<ui::GestureRecognizer> gesture_recognizer_; | |
491 | |
472 // True if we're in the midst of a paint operation and should respond to | 492 // True if we're in the midst of a paint operation and should respond to |
473 // DidPaintRect() notifications by merely invalidating. See comments on | 493 // DidPaintRect() notifications by merely invalidating. See comments on |
474 // render_widget_host_view.h:DidPaintRect(). | 494 // render_widget_host_view.h:DidPaintRect(). |
475 bool about_to_validate_and_paint_; | 495 bool about_to_validate_and_paint_; |
476 | 496 |
477 // true if the View should be closed when its HWND is deactivated (used to | 497 // true if the View should be closed when its HWND is deactivated (used to |
478 // support SELECT popups which are closed when they are deactivated). | 498 // support SELECT popups which are closed when they are deactivated). |
479 bool close_on_deactivate_; | 499 bool close_on_deactivate_; |
480 | 500 |
481 // Whether Destroy() has been called. Used to detect a crasher | 501 // Whether Destroy() has been called. Used to detect a crasher |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
573 | 593 |
574 // Are touch events currently enabled? | 594 // Are touch events currently enabled? |
575 bool touch_events_enabled_; | 595 bool touch_events_enabled_; |
576 | 596 |
577 gfx::ScopedSysColorChangeListener sys_color_change_listener_; | 597 gfx::ScopedSysColorChangeListener sys_color_change_listener_; |
578 | 598 |
579 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewWin); | 599 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewWin); |
580 }; | 600 }; |
581 | 601 |
582 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_ | 602 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_ |
OLD | NEW |