| OLD | NEW |
| 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 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> |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 MSG_WM_KILLFOCUS(OnKillFocus) | 97 MSG_WM_KILLFOCUS(OnKillFocus) |
| 98 MSG_WM_CAPTURECHANGED(OnCaptureChanged) | 98 MSG_WM_CAPTURECHANGED(OnCaptureChanged) |
| 99 MSG_WM_CANCELMODE(OnCancelMode) | 99 MSG_WM_CANCELMODE(OnCancelMode) |
| 100 MSG_WM_INPUTLANGCHANGE(OnInputLangChange) | 100 MSG_WM_INPUTLANGCHANGE(OnInputLangChange) |
| 101 MSG_WM_THEMECHANGED(OnThemeChanged) | 101 MSG_WM_THEMECHANGED(OnThemeChanged) |
| 102 MSG_WM_NOTIFY(OnNotify) | 102 MSG_WM_NOTIFY(OnNotify) |
| 103 MESSAGE_HANDLER(WM_IME_SETCONTEXT, OnImeSetContext) | 103 MESSAGE_HANDLER(WM_IME_SETCONTEXT, OnImeSetContext) |
| 104 MESSAGE_HANDLER(WM_IME_STARTCOMPOSITION, OnImeStartComposition) | 104 MESSAGE_HANDLER(WM_IME_STARTCOMPOSITION, OnImeStartComposition) |
| 105 MESSAGE_HANDLER(WM_IME_COMPOSITION, OnImeComposition) | 105 MESSAGE_HANDLER(WM_IME_COMPOSITION, OnImeComposition) |
| 106 MESSAGE_HANDLER(WM_IME_ENDCOMPOSITION, OnImeEndComposition) | 106 MESSAGE_HANDLER(WM_IME_ENDCOMPOSITION, OnImeEndComposition) |
| 107 MESSAGE_HANDLER(WM_IME_REQUEST, OnImeRequest) |
| 107 MESSAGE_HANDLER(WM_MOUSEMOVE, OnMouseEvent) | 108 MESSAGE_HANDLER(WM_MOUSEMOVE, OnMouseEvent) |
| 108 MESSAGE_HANDLER(WM_MOUSELEAVE, OnMouseEvent) | 109 MESSAGE_HANDLER(WM_MOUSELEAVE, OnMouseEvent) |
| 109 MESSAGE_HANDLER(WM_LBUTTONDOWN, OnMouseEvent) | 110 MESSAGE_HANDLER(WM_LBUTTONDOWN, OnMouseEvent) |
| 110 MESSAGE_HANDLER(WM_MBUTTONDOWN, OnMouseEvent) | 111 MESSAGE_HANDLER(WM_MBUTTONDOWN, OnMouseEvent) |
| 111 MESSAGE_HANDLER(WM_RBUTTONDOWN, OnMouseEvent) | 112 MESSAGE_HANDLER(WM_RBUTTONDOWN, OnMouseEvent) |
| 112 MESSAGE_HANDLER(WM_LBUTTONUP, OnMouseEvent) | 113 MESSAGE_HANDLER(WM_LBUTTONUP, OnMouseEvent) |
| 113 MESSAGE_HANDLER(WM_MBUTTONUP, OnMouseEvent) | 114 MESSAGE_HANDLER(WM_MBUTTONUP, OnMouseEvent) |
| 114 MESSAGE_HANDLER(WM_RBUTTONUP, OnMouseEvent) | 115 MESSAGE_HANDLER(WM_RBUTTONUP, OnMouseEvent) |
| 115 MESSAGE_HANDLER(WM_LBUTTONDBLCLK, OnMouseEvent) | 116 MESSAGE_HANDLER(WM_LBUTTONDBLCLK, OnMouseEvent) |
| 116 MESSAGE_HANDLER(WM_MBUTTONDBLCLK, OnMouseEvent) | 117 MESSAGE_HANDLER(WM_MBUTTONDBLCLK, OnMouseEvent) |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 virtual void Hide() OVERRIDE; | 153 virtual void Hide() OVERRIDE; |
| 153 virtual bool IsShowing() OVERRIDE; | 154 virtual bool IsShowing() OVERRIDE; |
| 154 virtual gfx::Rect GetViewBounds() const OVERRIDE; | 155 virtual gfx::Rect GetViewBounds() const OVERRIDE; |
| 155 virtual void UpdateCursor(const WebCursor& cursor) OVERRIDE; | 156 virtual void UpdateCursor(const WebCursor& cursor) OVERRIDE; |
| 156 virtual void SetIsLoading(bool is_loading) OVERRIDE; | 157 virtual void SetIsLoading(bool is_loading) OVERRIDE; |
| 157 virtual void TextInputStateChanged(ui::TextInputType type, | 158 virtual void TextInputStateChanged(ui::TextInputType type, |
| 158 bool can_compose_inline) OVERRIDE; | 159 bool can_compose_inline) OVERRIDE; |
| 159 virtual void SelectionBoundsChanged(const gfx::Rect& start_rect, | 160 virtual void SelectionBoundsChanged(const gfx::Rect& start_rect, |
| 160 const gfx::Rect& end_rect) OVERRIDE; | 161 const gfx::Rect& end_rect) OVERRIDE; |
| 161 virtual void ImeCancelComposition() OVERRIDE; | 162 virtual void ImeCancelComposition() OVERRIDE; |
| 163 virtual void ImeCompositionRangeChanged(const ui::Range& range) OVERRIDE; |
| 162 virtual void DidUpdateBackingStore( | 164 virtual void DidUpdateBackingStore( |
| 163 const gfx::Rect& scroll_rect, int scroll_dx, int scroll_dy, | 165 const gfx::Rect& scroll_rect, int scroll_dx, int scroll_dy, |
| 164 const std::vector<gfx::Rect>& copy_rects) OVERRIDE; | 166 const std::vector<gfx::Rect>& copy_rects) OVERRIDE; |
| 165 virtual void RenderViewGone(base::TerminationStatus status, | 167 virtual void RenderViewGone(base::TerminationStatus status, |
| 166 int error_code) OVERRIDE; | 168 int error_code) OVERRIDE; |
| 167 // called by TabContents before DestroyWindow | 169 // called by TabContents before DestroyWindow |
| 168 virtual void WillWmDestroy() OVERRIDE; | 170 virtual void WillWmDestroy() OVERRIDE; |
| 169 virtual void Destroy() OVERRIDE; | 171 virtual void Destroy() OVERRIDE; |
| 170 virtual void SetTooltipText(const string16& tooltip_text) OVERRIDE; | 172 virtual void SetTooltipText(const string16& tooltip_text) OVERRIDE; |
| 171 virtual BackingStore* AllocBackingStore(const gfx::Size& size) OVERRIDE; | 173 virtual BackingStore* AllocBackingStore(const gfx::Size& size) OVERRIDE; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 void OnThemeChanged(); | 214 void OnThemeChanged(); |
| 213 LRESULT OnNotify(int w_param, NMHDR* header); | 215 LRESULT OnNotify(int w_param, NMHDR* header); |
| 214 LRESULT OnImeSetContext( | 216 LRESULT OnImeSetContext( |
| 215 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); | 217 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); |
| 216 LRESULT OnImeStartComposition( | 218 LRESULT OnImeStartComposition( |
| 217 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); | 219 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); |
| 218 LRESULT OnImeComposition( | 220 LRESULT OnImeComposition( |
| 219 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); | 221 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); |
| 220 LRESULT OnImeEndComposition( | 222 LRESULT OnImeEndComposition( |
| 221 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); | 223 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); |
| 224 LRESULT OnImeRequest( |
| 225 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); |
| 222 LRESULT OnMouseEvent( | 226 LRESULT OnMouseEvent( |
| 223 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); | 227 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); |
| 224 LRESULT OnKeyEvent( | 228 LRESULT OnKeyEvent( |
| 225 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); | 229 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); |
| 226 LRESULT OnWheelEvent( | 230 LRESULT OnWheelEvent( |
| 227 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); | 231 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); |
| 228 LRESULT OnMouseActivate(UINT message, | 232 LRESULT OnMouseActivate(UINT message, |
| 229 WPARAM wparam, | 233 WPARAM wparam, |
| 230 LPARAM lparam, | 234 LPARAM lparam, |
| 231 BOOL& handled); | 235 BOOL& handled); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 // Do initialization needed by both InitAsPopup() and InitAsFullscreen(). | 297 // Do initialization needed by both InitAsPopup() and InitAsFullscreen(). |
| 294 void DoPopupOrFullscreenInit(HWND parent_hwnd, | 298 void DoPopupOrFullscreenInit(HWND parent_hwnd, |
| 295 const gfx::Rect& pos, | 299 const gfx::Rect& pos, |
| 296 DWORD ex_style); | 300 DWORD ex_style); |
| 297 | 301 |
| 298 CPoint GetClientCenter() const; | 302 CPoint GetClientCenter() const; |
| 299 void MoveCursorToCenter() const; | 303 void MoveCursorToCenter() const; |
| 300 | 304 |
| 301 void HandleLockedMouseEvent(UINT message, WPARAM wparam, LPARAM lparam); | 305 void HandleLockedMouseEvent(UINT message, WPARAM wparam, LPARAM lparam); |
| 302 | 306 |
| 307 LRESULT OnDocumentFeed(RECONVERTSTRING* reconv); |
| 308 LRESULT OnReconvertString(RECONVERTSTRING* reconv); |
| 309 |
| 303 // The associated Model. While |this| is being Destroyed, | 310 // The associated Model. While |this| is being Destroyed, |
| 304 // |render_widget_host_| is NULL and the Windows message loop is run one last | 311 // |render_widget_host_| is NULL and the Windows message loop is run one last |
| 305 // time. Message handlers must check for a NULL |render_widget_host_|. | 312 // time. Message handlers must check for a NULL |render_widget_host_|. |
| 306 RenderWidgetHost* render_widget_host_; | 313 RenderWidgetHost* render_widget_host_; |
| 307 | 314 |
| 308 // When we are doing accelerated compositing | 315 // When we are doing accelerated compositing |
| 309 HWND compositor_host_window_; | 316 HWND compositor_host_window_; |
| 310 | 317 |
| 311 // true if the compositor host window must be hidden after the | 318 // true if the compositor host window must be hidden after the |
| 312 // software renderered view is updated. | 319 // software renderered view is updated. |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 // lock was entered. | 407 // lock was entered. |
| 401 // Relative to the upper-left corner of the view. | 408 // Relative to the upper-left corner of the view. |
| 402 gfx::Point last_mouse_position_; | 409 gfx::Point last_mouse_position_; |
| 403 // Relative to the upper-left corner of the screen. | 410 // Relative to the upper-left corner of the screen. |
| 404 gfx::Point last_global_mouse_position_; | 411 gfx::Point last_global_mouse_position_; |
| 405 | 412 |
| 406 // In the case of the mouse being moved away from the view and then moved | 413 // In the case of the mouse being moved away from the view and then moved |
| 407 // back, we regard the mouse movement as (0, 0). | 414 // back, we regard the mouse movement as (0, 0). |
| 408 bool ignore_mouse_movement_; | 415 bool ignore_mouse_movement_; |
| 409 | 416 |
| 417 ui::Range composition_range_; |
| 418 |
| 410 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewWin); | 419 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewWin); |
| 411 }; | 420 }; |
| 412 | 421 |
| 413 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_ | 422 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_ |
| OLD | NEW |