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