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

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

Issue 647613002: Fix RenderWidgetHostViewGuest leak. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bring back mac delegate() Created 6 years, 2 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 virtual void OnViewDestroyed() = 0; 125 virtual void OnViewDestroyed() = 0;
126 126
127 protected: 127 protected:
128 virtual ~TouchEditingClient() {} 128 virtual ~TouchEditingClient() {}
129 }; 129 };
130 130
131 void set_touch_editing_client(TouchEditingClient* client) { 131 void set_touch_editing_client(TouchEditingClient* client) {
132 touch_editing_client_ = client; 132 touch_editing_client_ = client;
133 } 133 }
134 134
135 explicit RenderWidgetHostViewAura(RenderWidgetHost* host); 135 // When |is_guest_view_hack| is true, this view isn't really the view for
136 // the |widget|, a RenderWidgetHostViewGuest is.
137 //
138 // TODO(lazyboy): Remove |is_guest_view_hack| once BrowserPlugin has migrated
139 // to use RWHVChildFrame (http://crbug.com/330264).
140 RenderWidgetHostViewAura(RenderWidgetHost* host, bool is_guest_view_hack);
136 141
137 // RenderWidgetHostView implementation. 142 // RenderWidgetHostView implementation.
138 virtual void InitAsChild(gfx::NativeView parent_view) override; 143 virtual void InitAsChild(gfx::NativeView parent_view) override;
139 virtual RenderWidgetHost* GetRenderWidgetHost() const override; 144 virtual RenderWidgetHost* GetRenderWidgetHost() const override;
140 virtual void SetSize(const gfx::Size& size) override; 145 virtual void SetSize(const gfx::Size& size) override;
141 virtual void SetBounds(const gfx::Rect& rect) override; 146 virtual void SetBounds(const gfx::Rect& rect) override;
142 virtual gfx::Vector2dF GetLastScrollOffset() const override; 147 virtual gfx::Vector2dF GetLastScrollOffset() const override;
143 virtual gfx::NativeView GetNativeView() const override; 148 virtual gfx::NativeView GetNativeView() const override;
144 virtual gfx::NativeViewId GetNativeViewId() const override; 149 virtual gfx::NativeViewId GetNativeViewId() const override;
145 virtual gfx::NativeViewAccessible GetNativeViewAccessible() override; 150 virtual gfx::NativeViewAccessible GetNativeViewAccessible() override;
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 615
611 // The last scroll offset of the view. 616 // The last scroll offset of the view.
612 gfx::Vector2dF last_scroll_offset_; 617 gfx::Vector2dF last_scroll_offset_;
613 618
614 gfx::Insets insets_; 619 gfx::Insets insets_;
615 620
616 std::vector<ui::LatencyInfo> software_latency_info_; 621 std::vector<ui::LatencyInfo> software_latency_info_;
617 622
618 scoped_ptr<aura::client::ScopedTooltipDisabler> tooltip_disabler_; 623 scoped_ptr<aura::client::ScopedTooltipDisabler> tooltip_disabler_;
619 624
625 // True when this view acts as a platform view hack for a
626 // RenderWidgetHostViewGuest.
627 bool is_guest_view_hack_;
628
620 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; 629 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_;
621 630
622 gfx::Rect disambiguation_target_rect_; 631 gfx::Rect disambiguation_target_rect_;
623 632
624 // The last scroll offset when we start to render the link disambiguation 633 // The last scroll offset when we start to render the link disambiguation
625 // view, so we can ensure the window hasn't moved between copying from the 634 // view, so we can ensure the window hasn't moved between copying from the
626 // compositing surface and showing the disambiguation popup. 635 // compositing surface and showing the disambiguation popup.
627 gfx::Vector2dF disambiguation_scroll_offset_; 636 gfx::Vector2dF disambiguation_scroll_offset_;
628 637
629 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); 638 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura);
630 }; 639 };
631 640
632 } // namespace content 641 } // namespace content
633 642
634 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ 643 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698