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_AURA_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
391 DestroyedAfterCopyRequest); | 391 DestroyedAfterCopyRequest); |
392 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, | 392 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, |
393 VisibleViewportTest); | 393 VisibleViewportTest); |
394 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, | 394 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, |
395 OverscrollResetsOnBlur); | 395 OverscrollResetsOnBlur); |
396 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, | 396 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, |
397 FinishCompositionByMouse); | 397 FinishCompositionByMouse); |
398 FRIEND_TEST_ALL_PREFIXES(WebContentsViewAuraTest, | 398 FRIEND_TEST_ALL_PREFIXES(WebContentsViewAuraTest, |
399 WebContentsViewReparent); | 399 WebContentsViewReparent); |
400 | 400 |
401 class WindowObserver; | |
402 friend class WindowObserver; | |
403 | |
404 void UpdateCursorIfOverSelf(); | 401 void UpdateCursorIfOverSelf(); |
405 | 402 |
406 // Tracks whether SnapToPhysicalPixelBoundary() has been called. | 403 // Tracks whether SnapToPhysicalPixelBoundary() has been called. |
407 bool has_snapped_to_boundary() { return has_snapped_to_boundary_; } | 404 bool has_snapped_to_boundary() { return has_snapped_to_boundary_; } |
408 void ResetHasSnappedToBoundary() { has_snapped_to_boundary_ = false; } | 405 void ResetHasSnappedToBoundary() { has_snapped_to_boundary_ = false; } |
409 | 406 |
410 // Set the bounds of the window and handle size changes. Assumes the caller | 407 // Set the bounds of the window and handle size changes. Assumes the caller |
411 // has already adjusted the origin of |rect| to conform to whatever coordinate | 408 // has already adjusted the origin of |rect| to conform to whatever coordinate |
412 // space is required by the aura::Window. | 409 // space is required by the aura::Window. |
413 void InternalSetBounds(const gfx::Rect& rect); | 410 void InternalSetBounds(const gfx::Rect& rect); |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
493 // Helper function to set keyboard focus to the main window. | 490 // Helper function to set keyboard focus to the main window. |
494 void SetKeyboardFocus(); | 491 void SetKeyboardFocus(); |
495 | 492 |
496 RenderFrameHostImpl* GetFocusedFrame(); | 493 RenderFrameHostImpl* GetFocusedFrame(); |
497 | 494 |
498 // Returns true if the |event| passed in can be forwarded to the renderer. | 495 // Returns true if the |event| passed in can be forwarded to the renderer. |
499 bool CanRendererHandleEvent(const ui::MouseEvent* event, | 496 bool CanRendererHandleEvent(const ui::MouseEvent* event, |
500 bool mouse_locked, | 497 bool mouse_locked, |
501 bool selection_popup); | 498 bool selection_popup); |
502 | 499 |
500 // Called when the parent window bounds change. | |
501 void HandleParentBoundsChanged(); | |
502 | |
503 // The model object. | 503 // The model object. |
504 RenderWidgetHostImpl* host_; | 504 RenderWidgetHostImpl* host_; |
505 | 505 |
506 aura::Window* window_; | 506 aura::Window* window_; |
507 | 507 |
508 scoped_ptr<DelegatedFrameHost> delegated_frame_host_; | 508 scoped_ptr<DelegatedFrameHost> delegated_frame_host_; |
509 | 509 |
510 class WindowObserver; | |
sky
2015/04/09 23:44:38
nit: I believe we try and group class and friend d
ananta
2015/04/10 00:36:52
Moved back to where it was before. I thought it wo
| |
511 friend class WindowObserver; | |
512 | |
513 class WindowAncestorObserver; | |
514 friend class WindowAncestorObserver; | |
515 | |
510 scoped_ptr<WindowObserver> window_observer_; | 516 scoped_ptr<WindowObserver> window_observer_; |
511 | 517 |
518 // Tracks the ancestors of the RWHVA window for bounds changed notifications. | |
sky
2015/04/09 23:44:38
nit: it isn't bounds change, rather screen bounds
ananta
2015/04/10 00:36:52
Reworded.
| |
519 scoped_ptr<WindowAncestorObserver> ancestor_window_observer_; | |
520 | |
512 // Are we in the process of closing? Tracked so fullscreen views can avoid | 521 // Are we in the process of closing? Tracked so fullscreen views can avoid |
513 // sending a second shutdown request to the host when they lose the focus | 522 // sending a second shutdown request to the host when they lose the focus |
514 // after requesting shutdown for another reason (e.g. Escape key). | 523 // after requesting shutdown for another reason (e.g. Escape key). |
515 bool in_shutdown_; | 524 bool in_shutdown_; |
516 | 525 |
517 // True if in the process of handling a window bounds changed notification. | 526 // True if in the process of handling a window bounds changed notification. |
518 bool in_bounds_changed_; | 527 bool in_bounds_changed_; |
519 | 528 |
520 // Is this a fullscreen view? | 529 // Is this a fullscreen view? |
521 bool is_fullscreen_; | 530 bool is_fullscreen_; |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
658 // compositing surface and showing the disambiguation popup. | 667 // compositing surface and showing the disambiguation popup. |
659 gfx::Vector2dF disambiguation_scroll_offset_; | 668 gfx::Vector2dF disambiguation_scroll_offset_; |
660 | 669 |
661 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; | 670 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; |
662 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); | 671 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); |
663 }; | 672 }; |
664 | 673 |
665 } // namespace content | 674 } // namespace content |
666 | 675 |
667 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 676 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
OLD | NEW |