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

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

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

Powered by Google App Engine
This is Rietveld 408576698