| 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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 | 328 |
| 329 // Whether the window should be activated. | 329 // Whether the window should be activated. |
| 330 bool IsActivatable() const; | 330 bool IsActivatable() const; |
| 331 | 331 |
| 332 // Do initialization needed by both InitAsPopup() and InitAsFullscreen(). | 332 // Do initialization needed by both InitAsPopup() and InitAsFullscreen(). |
| 333 void DoPopupOrFullscreenInit(HWND parent_hwnd, | 333 void DoPopupOrFullscreenInit(HWND parent_hwnd, |
| 334 const gfx::Rect& pos, | 334 const gfx::Rect& pos, |
| 335 DWORD ex_style); | 335 DWORD ex_style); |
| 336 | 336 |
| 337 CPoint GetClientCenter() const; | 337 CPoint GetClientCenter() const; |
| 338 void MoveCursorToCenter() const; | 338 // In mouse lock mode, moves the mouse cursor to the center of the view if it |
| 339 // is too close to the border. |
| 340 void MoveCursorToCenterIfNecessary(); |
| 339 | 341 |
| 340 void HandleLockedMouseEvent(UINT message, WPARAM wparam, LPARAM lparam); | 342 void HandleLockedMouseEvent(UINT message, WPARAM wparam, LPARAM lparam); |
| 341 | 343 |
| 342 LRESULT OnDocumentFeed(RECONVERTSTRING* reconv); | 344 LRESULT OnDocumentFeed(RECONVERTSTRING* reconv); |
| 343 LRESULT OnReconvertString(RECONVERTSTRING* reconv); | 345 LRESULT OnReconvertString(RECONVERTSTRING* reconv); |
| 344 | 346 |
| 345 // The associated Model. While |this| is being Destroyed, | 347 // The associated Model. While |this| is being Destroyed, |
| 346 // |render_widget_host_| is NULL and the Windows message loop is run one last | 348 // |render_widget_host_| is NULL and the Windows message loop is run one last |
| 347 // time. Message handlers must check for a NULL |render_widget_host_|. | 349 // time. Message handlers must check for a NULL |render_widget_host_|. |
| 348 RenderWidgetHost* render_widget_host_; | 350 RenderWidgetHost* render_widget_host_; |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 // Stores the current text input type received by TextInputStateChanged() | 474 // Stores the current text input type received by TextInputStateChanged() |
| 473 // method. | 475 // method. |
| 474 ui::TextInputType text_input_type_; | 476 ui::TextInputType text_input_type_; |
| 475 | 477 |
| 476 ScopedVector<ui::ViewProp> props_; | 478 ScopedVector<ui::ViewProp> props_; |
| 477 | 479 |
| 478 // Is the widget fullscreen? | 480 // Is the widget fullscreen? |
| 479 bool is_fullscreen_; | 481 bool is_fullscreen_; |
| 480 | 482 |
| 481 // Used to record the last position of the mouse. | 483 // Used to record the last position of the mouse. |
| 482 // While the mouse is locked, they store the last known position just as mouse | 484 // While the mouse is locked, |last_unlocked_mouse_position_| and |
| 483 // lock was entered. | 485 // |last_unlocked_global_mouse_position_| store the last known position just |
| 486 // as mouse lock was entered. |
| 484 // Relative to the upper-left corner of the view. | 487 // Relative to the upper-left corner of the view. |
| 485 gfx::Point last_mouse_position_; | 488 gfx::Point last_unlocked_mouse_position_; |
| 486 // Relative to the upper-left corner of the screen. | 489 // Relative to the upper-left corner of the screen. |
| 487 gfx::Point last_global_mouse_position_; | 490 gfx::Point last_unlocked_global_mouse_position_; |
| 491 // Valid while the mouse is locked. |
| 492 gfx::Point last_locked_global_mouse_position_; |
| 493 |
| 494 // When the mouse cursor is moved to the center of the view by |
| 495 // MoveCursorToCenterIfNecessary(), we ignore the resulting WM_MOUSEMOVE |
| 496 // message. |
| 497 bool ignore_move_to_center_message_; |
| 488 | 498 |
| 489 // In the case of the mouse being moved away from the view and then moved | 499 // In the case of the mouse being moved away from the view and then moved |
| 490 // back, we regard the mouse movement as (0, 0). | 500 // back, we regard the mouse movement as (0, 0). |
| 491 bool ignore_mouse_movement_; | 501 bool ignore_mouse_movement_; |
| 492 | 502 |
| 493 ui::Range composition_range_; | 503 ui::Range composition_range_; |
| 494 | 504 |
| 495 // Set to true if the next lbutton down message is to be ignored. Set by the | 505 // Set to true if the next lbutton down message is to be ignored. Set by the |
| 496 // WM_POINTERXX handler. We do this to ensure that we don't send out | 506 // WM_POINTERXX handler. We do this to ensure that we don't send out |
| 497 // duplicate lbutton down messages to the renderer. | 507 // duplicate lbutton down messages to the renderer. |
| 498 bool ignore_next_lbutton_message_at_same_location; | 508 bool ignore_next_lbutton_message_at_same_location; |
| 499 // The location of the last WM_POINTERDOWN message. We ignore the subsequent | 509 // The location of the last WM_POINTERDOWN message. We ignore the subsequent |
| 500 // lbutton down only if the locations match. | 510 // lbutton down only if the locations match. |
| 501 LPARAM last_pointer_down_location_; | 511 LPARAM last_pointer_down_location_; |
| 502 | 512 |
| 503 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewWin); | 513 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewWin); |
| 504 }; | 514 }; |
| 505 | 515 |
| 506 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_ | 516 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_ |
| OLD | NEW |