Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(393)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.h

Issue 796333009: Revert "Create only a single LegacyRenderWidgetHostHWND per WebContentsViewAura." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 gfx::NativeViewAccessible AccessibilityGetNativeViewAccessible() override; 221 gfx::NativeViewAccessible AccessibilityGetNativeViewAccessible() override;
222 void ShowDisambiguationPopup(const gfx::Rect& rect_pixels, 222 void ShowDisambiguationPopup(const gfx::Rect& rect_pixels,
223 const SkBitmap& zoomed_bitmap) override; 223 const SkBitmap& zoomed_bitmap) override;
224 bool LockMouse() override; 224 bool LockMouse() override;
225 void UnlockMouse() override; 225 void UnlockMouse() override;
226 void OnSwapCompositorFrame(uint32 output_surface_id, 226 void OnSwapCompositorFrame(uint32 output_surface_id,
227 scoped_ptr<cc::CompositorFrame> frame) override; 227 scoped_ptr<cc::CompositorFrame> frame) override;
228 void DidStopFlinging() override; 228 void DidStopFlinging() override;
229 229
230 #if defined(OS_WIN) 230 #if defined(OS_WIN)
231 void SetLegacyRenderWidgetHostHWND(LegacyRenderWidgetHostHWND* legacy_hwnd);
232 virtual void SetParentNativeViewAccessible( 231 virtual void SetParentNativeViewAccessible(
233 gfx::NativeViewAccessible accessible_parent) override; 232 gfx::NativeViewAccessible accessible_parent) override;
234 virtual gfx::NativeViewId GetParentForWindowlessPlugin() const override; 233 virtual gfx::NativeViewId GetParentForWindowlessPlugin() const override;
235 #endif 234 #endif
236 235
237 // Overridden from ui::TextInputClient: 236 // Overridden from ui::TextInputClient:
238 void SetCompositionText(const ui::CompositionText& composition) override; 237 void SetCompositionText(const ui::CompositionText& composition) override;
239 void ConfirmCompositionText() override; 238 void ConfirmCompositionText() override;
240 void ClearCompositionText() override; 239 void ClearCompositionText() override;
241 void InsertText(const base::string16& text) override; 240 void InsertText(const base::string16& text) override;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 void OnTextInputStateChanged(const ViewHostMsg_TextInputState_Params& params); 320 void OnTextInputStateChanged(const ViewHostMsg_TextInputState_Params& params);
322 321
323 #if defined(OS_WIN) 322 #if defined(OS_WIN)
324 // Sets the cutout rects from constrained windows. These are rectangles that 323 // Sets the cutout rects from constrained windows. These are rectangles that
325 // windowed NPAPI plugins shouldn't paint in. Overwrites any previous cutout 324 // windowed NPAPI plugins shouldn't paint in. Overwrites any previous cutout
326 // rects. 325 // rects.
327 void UpdateConstrainedWindowRects(const std::vector<gfx::Rect>& rects); 326 void UpdateConstrainedWindowRects(const std::vector<gfx::Rect>& rects);
328 327
329 // Updates the cursor clip region. Used for mouse locking. 328 // Updates the cursor clip region. Used for mouse locking.
330 void UpdateMouseLockRegion(); 329 void UpdateMouseLockRegion();
330
331 // Notification that the LegacyRenderWidgetHostHWND was destroyed.
332 void OnLegacyWindowDestroyed();
331 #endif 333 #endif
332 334
333 void DisambiguationPopupRendered(const SkBitmap& result, 335 void DisambiguationPopupRendered(const SkBitmap& result,
334 ReadbackResponse response); 336 ReadbackResponse response);
335 337
336 void HideDisambiguationPopup(); 338 void HideDisambiguationPopup();
337 339
338 void ProcessDisambiguationGesture(ui::GestureEvent* event); 340 void ProcessDisambiguationGesture(ui::GestureEvent* event);
339 341
340 void ProcessDisambiguationMouse(ui::MouseEvent* event); 342 void ProcessDisambiguationMouse(ui::MouseEvent* event);
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 // Contains information about each windowed plugin's clip and cutout rects ( 591 // Contains information about each windowed plugin's clip and cutout rects (
590 // from the renderer). This is needed because when the transient windows 592 // 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 593 // over this view changes, we need this information in order to create a new
592 // region for the HWND. 594 // region for the HWND.
593 PluginWindowMoves plugin_window_moves_; 595 PluginWindowMoves plugin_window_moves_;
594 596
595 // The LegacyRenderWidgetHostHWND class provides a dummy HWND which is used 597 // The LegacyRenderWidgetHostHWND class provides a dummy HWND which is used
596 // for accessibility, as the container for windowless plugins like 598 // for accessibility, as the container for windowless plugins like
597 // Flash/Silverlight, etc and for legacy drivers for trackpoints/trackpads, 599 // Flash/Silverlight, etc and for legacy drivers for trackpoints/trackpads,
598 // etc. 600 // etc.
601 // The LegacyRenderWidgetHostHWND instance is created during the first call
602 // to RenderWidgetHostViewAura::InternalSetBounds. The instance is destroyed
603 // when the LegacyRenderWidgetHostHWND hwnd is destroyed.
599 content::LegacyRenderWidgetHostHWND* legacy_render_widget_host_HWND_; 604 content::LegacyRenderWidgetHostHWND* legacy_render_widget_host_HWND_;
605
606 // Set to true if the legacy_render_widget_host_HWND_ instance was destroyed
607 // by Windows. This could happen if the browser window was destroyed by
608 // DestroyWindow for e.g. This flag helps ensure that we don't try to create
609 // the LegacyRenderWidgetHostHWND instance again as that would be a futile
610 // exercise.
611 bool legacy_window_destroyed_;
600 #endif 612 #endif
601 613
602 bool has_snapped_to_boundary_; 614 bool has_snapped_to_boundary_;
603 615
604 TouchEditingClient* touch_editing_client_; 616 TouchEditingClient* touch_editing_client_;
605 617
606 scoped_ptr<OverscrollController> overscroll_controller_; 618 scoped_ptr<OverscrollController> overscroll_controller_;
607 619
608 // The last scroll offset of the view. 620 // The last scroll offset of the view.
609 gfx::Vector2dF last_scroll_offset_; 621 gfx::Vector2dF last_scroll_offset_;
(...skipping 15 matching lines...) Expand all
625 // compositing surface and showing the disambiguation popup. 637 // compositing surface and showing the disambiguation popup.
626 gfx::Vector2dF disambiguation_scroll_offset_; 638 gfx::Vector2dF disambiguation_scroll_offset_;
627 639
628 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; 640 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_;
629 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); 641 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura);
630 }; 642 };
631 643
632 } // namespace content 644 } // namespace content
633 645
634 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ 646 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698