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 <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, TouchEventSyncAsync); | 388 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, TouchEventSyncAsync); |
389 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, SwapNotifiesWindow); | 389 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, SwapNotifiesWindow); |
390 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, | 390 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, |
391 SkippedDelegatedFrames); | 391 SkippedDelegatedFrames); |
392 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, OutputSurfaceIdChange); | 392 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, OutputSurfaceIdChange); |
393 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, | 393 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, |
394 DiscardDelegatedFrames); | 394 DiscardDelegatedFrames); |
395 | 395 |
396 class WindowObserver; | 396 class WindowObserver; |
397 friend class WindowObserver; | 397 friend class WindowObserver; |
398 #if defined(OS_WIN) | |
399 class TransientWindowObserver; | |
400 friend class TransientWindowObserver; | |
401 #endif | |
402 | 398 |
403 // Overridden from ImageTransportFactoryObserver: | 399 // Overridden from ImageTransportFactoryObserver: |
404 virtual void OnLostResources() OVERRIDE; | 400 virtual void OnLostResources() OVERRIDE; |
405 | 401 |
406 // Overridden from BrowserAccessibilityDelegate: | 402 // Overridden from BrowserAccessibilityDelegate: |
407 virtual void SetAccessibilityFocus(int acc_obj_id) OVERRIDE; | 403 virtual void SetAccessibilityFocus(int acc_obj_id) OVERRIDE; |
408 virtual void AccessibilityDoDefaultAction(int acc_obj_id) OVERRIDE; | 404 virtual void AccessibilityDoDefaultAction(int acc_obj_id) OVERRIDE; |
409 virtual void AccessibilityScrollToMakeVisible( | 405 virtual void AccessibilityScrollToMakeVisible( |
410 int acc_obj_id, gfx::Rect subfocus) OVERRIDE; | 406 int acc_obj_id, gfx::Rect subfocus) OVERRIDE; |
411 virtual void AccessibilityScrollToPoint( | 407 virtual void AccessibilityScrollToPoint( |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 void SendSoftwareFrameAck(uint32 output_surface_id); | 545 void SendSoftwareFrameAck(uint32 output_surface_id); |
550 void SendReclaimSoftwareFrames(); | 546 void SendReclaimSoftwareFrames(); |
551 void ReleaseSoftwareFrame(uint32 output_surface_id, | 547 void ReleaseSoftwareFrame(uint32 output_surface_id, |
552 unsigned software_frame_id); | 548 unsigned software_frame_id); |
553 | 549 |
554 void DidReceiveFrameFromRenderer(); | 550 void DidReceiveFrameFromRenderer(); |
555 | 551 |
556 BrowserAccessibilityManager* GetOrCreateBrowserAccessibilityManager(); | 552 BrowserAccessibilityManager* GetOrCreateBrowserAccessibilityManager(); |
557 | 553 |
558 #if defined(OS_WIN) | 554 #if defined(OS_WIN) |
559 // Sets the cutout rects from transient windows. These are rectangles that | |
560 // windowed NPAPI plugins shouldn't paint in. Overwrites any previous cutout | |
561 // rects. | |
562 void UpdateTransientRects(const std::vector<gfx::Rect>& rects); | |
563 | |
564 // Updates the total list of cutout rects, which is the union of transient | 555 // Updates the total list of cutout rects, which is the union of transient |
565 // windows and constrained windows. | 556 // windows and constrained windows. |
566 void UpdateCutoutRects(); | 557 void UpdateCutoutRects(); |
567 #endif | 558 #endif |
568 | 559 |
569 // The model object. | 560 // The model object. |
570 RenderWidgetHostImpl* host_; | 561 RenderWidgetHostImpl* host_; |
571 | 562 |
572 aura::Window* window_; | 563 aura::Window* window_; |
573 | 564 |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
724 NOT_VISIBLE, | 715 NOT_VISIBLE, |
725 }; | 716 }; |
726 CursorVisibilityState cursor_visibility_state_in_renderer_; | 717 CursorVisibilityState cursor_visibility_state_in_renderer_; |
727 | 718 |
728 // An observer to notify that the paint content of the view has changed. The | 719 // An observer to notify that the paint content of the view has changed. The |
729 // observer is not owned by the view, and must remove itself as an oberver | 720 // observer is not owned by the view, and must remove itself as an oberver |
730 // when it is being destroyed. | 721 // when it is being destroyed. |
731 PaintObserver* paint_observer_; | 722 PaintObserver* paint_observer_; |
732 | 723 |
733 #if defined(OS_WIN) | 724 #if defined(OS_WIN) |
734 scoped_ptr<TransientWindowObserver> transient_observer_; | 725 // The list of rectangles from constrained windows over this view. Windowed |
735 | 726 // NPAPI plugins shouldn't draw over them. |
736 // The list of rectangles from transient and constrained windows over this | |
737 // view. Windowed NPAPI plugins shouldn't draw over them. | |
738 std::vector<gfx::Rect> transient_rects_; | |
739 std::vector<gfx::Rect> constrained_rects_; | 727 std::vector<gfx::Rect> constrained_rects_; |
740 | 728 |
741 typedef std::map<HWND, WebPluginGeometry> PluginWindowMoves; | 729 typedef std::map<HWND, WebPluginGeometry> PluginWindowMoves; |
742 // Contains information about each windowed plugin's clip and cutout rects ( | 730 // Contains information about each windowed plugin's clip and cutout rects ( |
743 // from the renderer). This is needed because when the transient windoiws | 731 // from the renderer). This is needed because when the transient windoiws |
744 // over this view changes, we need this information in order to create a new | 732 // over this view changes, we need this information in order to create a new |
745 // region for the HWND. | 733 // region for the HWND. |
746 PluginWindowMoves plugin_window_moves_; | 734 PluginWindowMoves plugin_window_moves_; |
747 #endif | 735 #endif |
748 | 736 |
(...skipping 19 matching lines...) Expand all Loading... |
768 scoped_ptr<ReleasedFrameInfo> released_software_frame_; | 756 scoped_ptr<ReleasedFrameInfo> released_software_frame_; |
769 scoped_ptr<DelegatedFrameEvictor> delegated_frame_evictor_; | 757 scoped_ptr<DelegatedFrameEvictor> delegated_frame_evictor_; |
770 | 758 |
771 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; | 759 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; |
772 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); | 760 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); |
773 }; | 761 }; |
774 | 762 |
775 } // namespace content | 763 } // namespace content |
776 | 764 |
777 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 765 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
OLD | NEW |