OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_ |
7 | 7 |
8 #include <atlbase.h> | 8 #include <atlbase.h> |
9 #include <atlapp.h> | 9 #include <atlapp.h> |
10 #include <atlcrack.h> | 10 #include <atlcrack.h> |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 // | 51 // |
52 // "The lifetime of the RenderWidgetHostHWND is tied to the render process. | 52 // "The lifetime of the RenderWidgetHostHWND is tied to the render process. |
53 // If the render process dies, the RenderWidgetHostHWND goes away and all | 53 // If the render process dies, the RenderWidgetHostHWND goes away and all |
54 // references to it must become NULL." | 54 // references to it must become NULL." |
55 // | 55 // |
56 class RenderWidgetHostViewWin | 56 class RenderWidgetHostViewWin |
57 : public CWindowImpl<RenderWidgetHostViewWin, | 57 : public CWindowImpl<RenderWidgetHostViewWin, |
58 CWindow, | 58 CWindow, |
59 RenderWidgetHostHWNDTraits>, | 59 RenderWidgetHostHWNDTraits>, |
60 public RenderWidgetHostView, | 60 public RenderWidgetHostView, |
61 public NotificationObserver { | 61 public NotificationObserver, |
| 62 public BrowserAccessibilityDelegate { |
62 public: | 63 public: |
63 // The view will associate itself with the given widget. | 64 // The view will associate itself with the given widget. |
64 explicit RenderWidgetHostViewWin(RenderWidgetHost* widget); | 65 explicit RenderWidgetHostViewWin(RenderWidgetHost* widget); |
65 virtual ~RenderWidgetHostViewWin(); | 66 virtual ~RenderWidgetHostViewWin(); |
66 | 67 |
67 void CreateWnd(HWND parent); | 68 void CreateWnd(HWND parent); |
68 | 69 |
69 DECLARE_WND_CLASS_EX(kRenderWidgetHostHWNDClass, CS_DBLCLKS, 0); | 70 DECLARE_WND_CLASS_EX(kRenderWidgetHostHWNDClass, CS_DBLCLKS, 0); |
70 | 71 |
71 BEGIN_MSG_MAP(RenderWidgetHostHWND) | 72 BEGIN_MSG_MAP(RenderWidgetHostHWND) |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 virtual void UpdateAccessibilityTree( | 148 virtual void UpdateAccessibilityTree( |
148 const webkit_glue::WebAccessibility& tree); | 149 const webkit_glue::WebAccessibility& tree); |
149 virtual void OnAccessibilityFocusChange(int acc_obj_id); | 150 virtual void OnAccessibilityFocusChange(int acc_obj_id); |
150 virtual void OnAccessibilityObjectStateChange(int acc_obj_id); | 151 virtual void OnAccessibilityObjectStateChange(int acc_obj_id); |
151 | 152 |
152 // Implementation of NotificationObserver: | 153 // Implementation of NotificationObserver: |
153 virtual void Observe(NotificationType type, | 154 virtual void Observe(NotificationType type, |
154 const NotificationSource& source, | 155 const NotificationSource& source, |
155 const NotificationDetails& details); | 156 const NotificationDetails& details); |
156 | 157 |
| 158 // Implementation of BrowserAccessibilityDelegate: |
| 159 virtual void SetAccessibilityFocus(int acc_obj_id); |
| 160 virtual void AccessibilityDoDefaultAction(int acc_obj_id); |
| 161 |
157 protected: | 162 protected: |
158 // Windows Message Handlers | 163 // Windows Message Handlers |
159 LRESULT OnCreate(CREATESTRUCT* create_struct); | 164 LRESULT OnCreate(CREATESTRUCT* create_struct); |
160 void OnActivate(UINT, BOOL, HWND); | 165 void OnActivate(UINT, BOOL, HWND); |
161 void OnDestroy(); | 166 void OnDestroy(); |
162 void OnPaint(HDC unused_dc); | 167 void OnPaint(HDC unused_dc); |
163 void OnNCPaint(HRGN update_region); | 168 void OnNCPaint(HRGN update_region); |
164 LRESULT OnEraseBkgnd(HDC dc); | 169 LRESULT OnEraseBkgnd(HDC dc); |
165 LRESULT OnSetCursor(HWND window, UINT hittest_code, UINT mouse_message_id); | 170 LRESULT OnSetCursor(HWND window, UINT hittest_code, UINT mouse_message_id); |
166 void OnSetFocus(HWND window); | 171 void OnSetFocus(HWND window); |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 // whenever we paint. | 332 // whenever we paint. |
328 bool visually_deemphasized_; | 333 bool visually_deemphasized_; |
329 | 334 |
330 // Registrar so we can listen to RENDERER_PROCESS_TERMINATED events. | 335 // Registrar so we can listen to RENDERER_PROCESS_TERMINATED events. |
331 NotificationRegistrar registrar_; | 336 NotificationRegistrar registrar_; |
332 | 337 |
333 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewWin); | 338 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewWin); |
334 }; | 339 }; |
335 | 340 |
336 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_ | 341 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_ |
OLD | NEW |