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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 virtual void ShowDisambiguationPopup(const gfx::Rect& rect_pixels, | 220 virtual void ShowDisambiguationPopup(const gfx::Rect& rect_pixels, |
221 const SkBitmap& zoomed_bitmap) override; | 221 const SkBitmap& zoomed_bitmap) override; |
222 virtual bool LockMouse() override; | 222 virtual bool LockMouse() override; |
223 virtual void UnlockMouse() override; | 223 virtual void UnlockMouse() override; |
224 virtual void OnSwapCompositorFrame( | 224 virtual void OnSwapCompositorFrame( |
225 uint32 output_surface_id, | 225 uint32 output_surface_id, |
226 scoped_ptr<cc::CompositorFrame> frame) override; | 226 scoped_ptr<cc::CompositorFrame> frame) override; |
227 virtual void DidStopFlinging() override; | 227 virtual void DidStopFlinging() override; |
228 | 228 |
229 #if defined(OS_WIN) | 229 #if defined(OS_WIN) |
| 230 void SetLegacyRenderWidgetHostHWND(LegacyRenderWidgetHostHWND* legacy_hwnd); |
230 virtual void SetParentNativeViewAccessible( | 231 virtual void SetParentNativeViewAccessible( |
231 gfx::NativeViewAccessible accessible_parent) override; | 232 gfx::NativeViewAccessible accessible_parent) override; |
232 virtual gfx::NativeViewId GetParentForWindowlessPlugin() const override; | 233 virtual gfx::NativeViewId GetParentForWindowlessPlugin() const override; |
233 #endif | 234 #endif |
234 | 235 |
235 // Overridden from ui::TextInputClient: | 236 // Overridden from ui::TextInputClient: |
236 virtual void SetCompositionText( | 237 virtual void SetCompositionText( |
237 const ui::CompositionText& composition) override; | 238 const ui::CompositionText& composition) override; |
238 virtual void ConfirmCompositionText() override; | 239 virtual void ConfirmCompositionText() override; |
239 virtual void ClearCompositionText() override; | 240 virtual void ClearCompositionText() override; |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 const gfx::Point& new_origin) override; | 318 const gfx::Point& new_origin) override; |
318 | 319 |
319 #if defined(OS_WIN) | 320 #if defined(OS_WIN) |
320 // Sets the cutout rects from constrained windows. These are rectangles that | 321 // Sets the cutout rects from constrained windows. These are rectangles that |
321 // windowed NPAPI plugins shouldn't paint in. Overwrites any previous cutout | 322 // windowed NPAPI plugins shouldn't paint in. Overwrites any previous cutout |
322 // rects. | 323 // rects. |
323 void UpdateConstrainedWindowRects(const std::vector<gfx::Rect>& rects); | 324 void UpdateConstrainedWindowRects(const std::vector<gfx::Rect>& rects); |
324 | 325 |
325 // Updates the cursor clip region. Used for mouse locking. | 326 // Updates the cursor clip region. Used for mouse locking. |
326 void UpdateMouseLockRegion(); | 327 void UpdateMouseLockRegion(); |
327 | |
328 // Notification that the LegacyRenderWidgetHostHWND was destroyed. | |
329 void OnLegacyWindowDestroyed(); | |
330 #endif | 328 #endif |
331 | 329 |
332 void DisambiguationPopupRendered(bool success, const SkBitmap& result); | 330 void DisambiguationPopupRendered(bool success, const SkBitmap& result); |
333 | 331 |
334 void HideDisambiguationPopup(); | 332 void HideDisambiguationPopup(); |
335 | 333 |
336 void ProcessDisambiguationGesture(ui::GestureEvent* event); | 334 void ProcessDisambiguationGesture(ui::GestureEvent* event); |
337 | 335 |
338 void ProcessDisambiguationMouse(ui::MouseEvent* event); | 336 void ProcessDisambiguationMouse(ui::MouseEvent* event); |
339 | 337 |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 // Contains information about each windowed plugin's clip and cutout rects ( | 580 // Contains information about each windowed plugin's clip and cutout rects ( |
583 // from the renderer). This is needed because when the transient windows | 581 // from the renderer). This is needed because when the transient windows |
584 // over this view changes, we need this information in order to create a new | 582 // over this view changes, we need this information in order to create a new |
585 // region for the HWND. | 583 // region for the HWND. |
586 PluginWindowMoves plugin_window_moves_; | 584 PluginWindowMoves plugin_window_moves_; |
587 | 585 |
588 // The LegacyRenderWidgetHostHWND class provides a dummy HWND which is used | 586 // The LegacyRenderWidgetHostHWND class provides a dummy HWND which is used |
589 // for accessibility, as the container for windowless plugins like | 587 // for accessibility, as the container for windowless plugins like |
590 // Flash/Silverlight, etc and for legacy drivers for trackpoints/trackpads, | 588 // Flash/Silverlight, etc and for legacy drivers for trackpoints/trackpads, |
591 // etc. | 589 // etc. |
592 // The LegacyRenderWidgetHostHWND instance is created during the first call | |
593 // to RenderWidgetHostViewAura::InternalSetBounds. The instance is destroyed | |
594 // when the LegacyRenderWidgetHostHWND hwnd is destroyed. | |
595 content::LegacyRenderWidgetHostHWND* legacy_render_widget_host_HWND_; | 590 content::LegacyRenderWidgetHostHWND* legacy_render_widget_host_HWND_; |
596 | |
597 // Set to true if the legacy_render_widget_host_HWND_ instance was destroyed | |
598 // by Windows. This could happen if the browser window was destroyed by | |
599 // DestroyWindow for e.g. This flag helps ensure that we don't try to create | |
600 // the LegacyRenderWidgetHostHWND instance again as that would be a futile | |
601 // exercise. | |
602 bool legacy_window_destroyed_; | |
603 #endif | 591 #endif |
604 | 592 |
605 bool has_snapped_to_boundary_; | 593 bool has_snapped_to_boundary_; |
606 | 594 |
607 TouchEditingClient* touch_editing_client_; | 595 TouchEditingClient* touch_editing_client_; |
608 | 596 |
609 scoped_ptr<OverscrollController> overscroll_controller_; | 597 scoped_ptr<OverscrollController> overscroll_controller_; |
610 | 598 |
611 // The last scroll offset of the view. | 599 // The last scroll offset of the view. |
612 gfx::Vector2dF last_scroll_offset_; | 600 gfx::Vector2dF last_scroll_offset_; |
(...skipping 12 matching lines...) Expand all Loading... |
625 // view, so we can ensure the window hasn't moved between copying from the | 613 // view, so we can ensure the window hasn't moved between copying from the |
626 // compositing surface and showing the disambiguation popup. | 614 // compositing surface and showing the disambiguation popup. |
627 gfx::Vector2dF disambiguation_scroll_offset_; | 615 gfx::Vector2dF disambiguation_scroll_offset_; |
628 | 616 |
629 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); | 617 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); |
630 }; | 618 }; |
631 | 619 |
632 } // namespace content | 620 } // namespace content |
633 | 621 |
634 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 622 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
OLD | NEW |