| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 virtual void Blur() OVERRIDE; | 150 virtual void Blur() OVERRIDE; |
| 150 virtual bool HasFocus() OVERRIDE; | 151 virtual bool HasFocus() OVERRIDE; |
| 151 virtual void Show() OVERRIDE; | 152 virtual void Show() OVERRIDE; |
| 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; |
| 160 virtual void SelectionChanged(const string16& text, |
| 161 size_t offset, |
| 162 const ui::Range& range) OVERRIDE; |
| 159 virtual void SelectionBoundsChanged(const gfx::Rect& start_rect, | 163 virtual void SelectionBoundsChanged(const gfx::Rect& start_rect, |
| 160 const gfx::Rect& end_rect) OVERRIDE; | 164 const gfx::Rect& end_rect) OVERRIDE; |
| 161 virtual void ImeCancelComposition() OVERRIDE; | 165 virtual void ImeCancelComposition() OVERRIDE; |
| 166 virtual void ImeCompositionRangeChanged(const ui::Range& range) OVERRIDE; |
| 162 virtual void DidUpdateBackingStore( | 167 virtual void DidUpdateBackingStore( |
| 163 const gfx::Rect& scroll_rect, int scroll_dx, int scroll_dy, | 168 const gfx::Rect& scroll_rect, int scroll_dx, int scroll_dy, |
| 164 const std::vector<gfx::Rect>& copy_rects) OVERRIDE; | 169 const std::vector<gfx::Rect>& copy_rects) OVERRIDE; |
| 165 virtual void RenderViewGone(base::TerminationStatus status, | 170 virtual void RenderViewGone(base::TerminationStatus status, |
| 166 int error_code) OVERRIDE; | 171 int error_code) OVERRIDE; |
| 167 // called by TabContents before DestroyWindow | 172 // called by TabContents before DestroyWindow |
| 168 virtual void WillWmDestroy() OVERRIDE; | 173 virtual void WillWmDestroy() OVERRIDE; |
| 169 virtual void Destroy() OVERRIDE; | 174 virtual void Destroy() OVERRIDE; |
| 170 virtual void SetTooltipText(const string16& tooltip_text) OVERRIDE; | 175 virtual void SetTooltipText(const string16& tooltip_text) OVERRIDE; |
| 171 virtual BackingStore* AllocBackingStore(const gfx::Size& size) OVERRIDE; | 176 virtual BackingStore* AllocBackingStore(const gfx::Size& size) OVERRIDE; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 void OnThemeChanged(); | 217 void OnThemeChanged(); |
| 213 LRESULT OnNotify(int w_param, NMHDR* header); | 218 LRESULT OnNotify(int w_param, NMHDR* header); |
| 214 LRESULT OnImeSetContext( | 219 LRESULT OnImeSetContext( |
| 215 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); | 220 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); |
| 216 LRESULT OnImeStartComposition( | 221 LRESULT OnImeStartComposition( |
| 217 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); | 222 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); |
| 218 LRESULT OnImeComposition( | 223 LRESULT OnImeComposition( |
| 219 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); | 224 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); |
| 220 LRESULT OnImeEndComposition( | 225 LRESULT OnImeEndComposition( |
| 221 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); | 226 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); |
| 227 LRESULT OnImeRequest( |
| 228 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); |
| 222 LRESULT OnMouseEvent( | 229 LRESULT OnMouseEvent( |
| 223 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); | 230 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); |
| 224 LRESULT OnKeyEvent( | 231 LRESULT OnKeyEvent( |
| 225 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); | 232 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); |
| 226 LRESULT OnWheelEvent( | 233 LRESULT OnWheelEvent( |
| 227 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); | 234 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); |
| 228 LRESULT OnMouseActivate(UINT message, | 235 LRESULT OnMouseActivate(UINT message, |
| 229 WPARAM wparam, | 236 WPARAM wparam, |
| 230 LPARAM lparam, | 237 LPARAM lparam, |
| 231 BOOL& handled); | 238 BOOL& handled); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 // Do initialization needed by both InitAsPopup() and InitAsFullscreen(). | 300 // Do initialization needed by both InitAsPopup() and InitAsFullscreen(). |
| 294 void DoPopupOrFullscreenInit(HWND parent_hwnd, | 301 void DoPopupOrFullscreenInit(HWND parent_hwnd, |
| 295 const gfx::Rect& pos, | 302 const gfx::Rect& pos, |
| 296 DWORD ex_style); | 303 DWORD ex_style); |
| 297 | 304 |
| 298 CPoint GetClientCenter() const; | 305 CPoint GetClientCenter() const; |
| 299 void MoveCursorToCenter() const; | 306 void MoveCursorToCenter() const; |
| 300 | 307 |
| 301 void HandleLockedMouseEvent(UINT message, WPARAM wparam, LPARAM lparam); | 308 void HandleLockedMouseEvent(UINT message, WPARAM wparam, LPARAM lparam); |
| 302 | 309 |
| 310 LRESULT OnDocumentFeed(RECONVERTSTRING* reconv); |
| 311 LRESULT OnReconvertString(RECONVERTSTRING* reconv); |
| 312 |
| 303 // The associated Model. While |this| is being Destroyed, | 313 // The associated Model. While |this| is being Destroyed, |
| 304 // |render_widget_host_| is NULL and the Windows message loop is run one last | 314 // |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_|. | 315 // time. Message handlers must check for a NULL |render_widget_host_|. |
| 306 RenderWidgetHost* render_widget_host_; | 316 RenderWidgetHost* render_widget_host_; |
| 307 | 317 |
| 308 // When we are doing accelerated compositing | 318 // When we are doing accelerated compositing |
| 309 HWND compositor_host_window_; | 319 HWND compositor_host_window_; |
| 310 | 320 |
| 311 // true if the compositor host window must be hidden after the | 321 // true if the compositor host window must be hidden after the |
| 312 // software renderered view is updated. | 322 // software renderered view is updated. |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 // lock was entered. | 410 // lock was entered. |
| 401 // Relative to the upper-left corner of the view. | 411 // Relative to the upper-left corner of the view. |
| 402 gfx::Point last_mouse_position_; | 412 gfx::Point last_mouse_position_; |
| 403 // Relative to the upper-left corner of the screen. | 413 // Relative to the upper-left corner of the screen. |
| 404 gfx::Point last_global_mouse_position_; | 414 gfx::Point last_global_mouse_position_; |
| 405 | 415 |
| 406 // In the case of the mouse being moved away from the view and then moved | 416 // 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). | 417 // back, we regard the mouse movement as (0, 0). |
| 408 bool ignore_mouse_movement_; | 418 bool ignore_mouse_movement_; |
| 409 | 419 |
| 420 // Stores current selection for IME reconversion. |
| 421 string16 selection_text_; |
| 422 size_t selection_text_offset_; |
| 423 ui::Range selection_range_; |
| 424 ui::Range composition_range_; |
| 425 |
| 410 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewWin); | 426 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewWin); |
| 411 }; | 427 }; |
| 412 | 428 |
| 413 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_ | 429 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_ |
| OLD | NEW |