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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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; | 401 class WindowObserver; |
402 friend class WindowObserver; | 402 friend class WindowObserver; |
403 | 403 |
404 class WindowAncestorObserver; | |
405 friend class WindowAncestorObserver; | |
406 | |
407 void UpdateCursorIfOverSelf(); | 404 void UpdateCursorIfOverSelf(); |
408 | 405 |
409 // Tracks whether SnapToPhysicalPixelBoundary() has been called. | 406 // Tracks whether SnapToPhysicalPixelBoundary() has been called. |
410 bool has_snapped_to_boundary() { return has_snapped_to_boundary_; } | 407 bool has_snapped_to_boundary() { return has_snapped_to_boundary_; } |
411 void ResetHasSnappedToBoundary() { has_snapped_to_boundary_ = false; } | 408 void ResetHasSnappedToBoundary() { has_snapped_to_boundary_ = false; } |
412 | 409 |
413 // Set the bounds of the window and handle size changes. Assumes the caller | 410 // Set the bounds of the window and handle size changes. Assumes the caller |
414 // has already adjusted the origin of |rect| to conform to whatever coordinate | 411 // has already adjusted the origin of |rect| to conform to whatever coordinate |
415 // space is required by the aura::Window. | 412 // space is required by the aura::Window. |
416 void InternalSetBounds(const gfx::Rect& rect); | 413 void InternalSetBounds(const gfx::Rect& rect); |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 // Helper function to set keyboard focus to the main window. | 493 // Helper function to set keyboard focus to the main window. |
497 void SetKeyboardFocus(); | 494 void SetKeyboardFocus(); |
498 | 495 |
499 RenderFrameHostImpl* GetFocusedFrame(); | 496 RenderFrameHostImpl* GetFocusedFrame(); |
500 | 497 |
501 // Returns true if the |event| passed in can be forwarded to the renderer. | 498 // Returns true if the |event| passed in can be forwarded to the renderer. |
502 bool CanRendererHandleEvent(const ui::MouseEvent* event, | 499 bool CanRendererHandleEvent(const ui::MouseEvent* event, |
503 bool mouse_locked, | 500 bool mouse_locked, |
504 bool selection_popup); | 501 bool selection_popup); |
505 | 502 |
506 // Called when the parent window bounds change. | |
507 void HandleParentBoundsChanged(); | |
508 | |
509 // Called when the parent window hierarchy for our window changes. | |
510 void ParentHierarchyChanged(); | |
511 | |
512 // The model object. | 503 // The model object. |
513 RenderWidgetHostImpl* host_; | 504 RenderWidgetHostImpl* host_; |
514 | 505 |
515 aura::Window* window_; | 506 aura::Window* window_; |
516 | 507 |
517 scoped_ptr<DelegatedFrameHost> delegated_frame_host_; | 508 scoped_ptr<DelegatedFrameHost> delegated_frame_host_; |
518 | 509 |
519 scoped_ptr<WindowObserver> window_observer_; | 510 scoped_ptr<WindowObserver> window_observer_; |
520 | 511 |
521 // Tracks the ancestors of the RWHVA window for window location changes. | |
522 scoped_ptr<WindowAncestorObserver> ancestor_window_observer_; | |
523 | |
524 // Are we in the process of closing? Tracked so fullscreen views can avoid | 512 // Are we in the process of closing? Tracked so fullscreen views can avoid |
525 // sending a second shutdown request to the host when they lose the focus | 513 // sending a second shutdown request to the host when they lose the focus |
526 // after requesting shutdown for another reason (e.g. Escape key). | 514 // after requesting shutdown for another reason (e.g. Escape key). |
527 bool in_shutdown_; | 515 bool in_shutdown_; |
528 | 516 |
529 // True if in the process of handling a window bounds changed notification. | 517 // True if in the process of handling a window bounds changed notification. |
530 bool in_bounds_changed_; | 518 bool in_bounds_changed_; |
531 | 519 |
532 // Is this a fullscreen view? | 520 // Is this a fullscreen view? |
533 bool is_fullscreen_; | 521 bool is_fullscreen_; |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
670 // compositing surface and showing the disambiguation popup. | 658 // compositing surface and showing the disambiguation popup. |
671 gfx::Vector2dF disambiguation_scroll_offset_; | 659 gfx::Vector2dF disambiguation_scroll_offset_; |
672 | 660 |
673 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; | 661 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; |
674 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); | 662 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); |
675 }; | 663 }; |
676 | 664 |
677 } // namespace content | 665 } // namespace content |
678 | 666 |
679 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 667 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
OLD | NEW |