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

Side by Side Diff: content/browser/web_contents/web_contents_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: Rebase 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_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_ 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_
6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_ 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "content/browser/renderer_host/overscroll_controller_delegate.h" 12 #include "content/browser/renderer_host/overscroll_controller_delegate.h"
13 #include "content/browser/renderer_host/render_view_host_delegate_view.h" 13 #include "content/browser/renderer_host/render_view_host_delegate_view.h"
14 #include "content/browser/web_contents/web_contents_view.h" 14 #include "content/browser/web_contents/web_contents_view.h"
15 #include "content/common/content_export.h" 15 #include "content/common/content_export.h"
16 #include "ui/aura/window_delegate.h" 16 #include "ui/aura/window_delegate.h"
17 #include "ui/aura/window_observer.h" 17 #include "ui/aura/window_observer.h"
18 #include "ui/compositor/layer_animation_observer.h" 18 #include "ui/compositor/layer_animation_observer.h"
19 #include "ui/wm/public/drag_drop_delegate.h" 19 #include "ui/wm/public/drag_drop_delegate.h"
20 20
21 #if defined(OS_WIN)
22 #include "content/browser/renderer_host/legacy_render_widget_host_win.h"
23 #endif
24
21 namespace aura { 25 namespace aura {
22 class Window; 26 class Window;
23 } 27 }
24 28
25 namespace ui { 29 namespace ui {
26 class DropTargetEvent; 30 class DropTargetEvent;
27 } 31 }
28 32
29 namespace content { 33 namespace content {
30 class GestureNavSimple; 34 class GestureNavSimple;
31 class OverscrollNavigationOverlay; 35 class OverscrollNavigationOverlay;
32 class RenderWidgetHostImpl; 36 class RenderWidgetHostImpl;
33 class RenderWidgetHostViewAura; 37 class RenderWidgetHostViewAura;
34 class ShadowLayerDelegate; 38 class ShadowLayerDelegate;
35 class TouchEditableImplAura; 39 class TouchEditableImplAura;
36 class WebContentsViewDelegate; 40 class WebContentsViewDelegate;
37 class WebContentsImpl; 41 class WebContentsImpl;
38 class WebDragDestDelegate; 42 class WebDragDestDelegate;
39 43
44 #if defined(OS_WIN)
45 class LegacyRenderWidgetHostHWND;
46 #endif
47
40 class WebContentsViewAura 48 class WebContentsViewAura
41 : public WebContentsView, 49 : public WebContentsView,
50 #if defined(OS_WIN)
51 public LegacyRenderWidgetHostHWNDDelegate,
52 #endif
42 public RenderViewHostDelegateView, 53 public RenderViewHostDelegateView,
43 public OverscrollControllerDelegate, 54 public OverscrollControllerDelegate,
44 public ui::ImplicitAnimationObserver, 55 public ui::ImplicitAnimationObserver,
45 public aura::WindowDelegate, 56 public aura::WindowDelegate,
46 public aura::client::DragDropDelegate, 57 public aura::client::DragDropDelegate,
47 public aura::WindowObserver { 58 public aura::WindowObserver {
48 public: 59 public:
49 WebContentsViewAura(WebContentsImpl* web_contents, 60 WebContentsViewAura(WebContentsImpl* web_contents,
50 WebContentsViewDelegate* delegate); 61 WebContentsViewDelegate* delegate);
51 62
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 virtual void OnDragExited() override; 194 virtual void OnDragExited() override;
184 virtual int OnPerformDrop(const ui::DropTargetEvent& event) override; 195 virtual int OnPerformDrop(const ui::DropTargetEvent& event) override;
185 196
186 // Overridden from aura::WindowObserver: 197 // Overridden from aura::WindowObserver:
187 virtual void OnWindowVisibilityChanged(aura::Window* window, 198 virtual void OnWindowVisibilityChanged(aura::Window* window,
188 bool visible) override; 199 bool visible) override;
189 200
190 // Update the web contents visiblity. 201 // Update the web contents visiblity.
191 void UpdateWebContentsVisibility(bool visible); 202 void UpdateWebContentsVisibility(bool visible);
192 203
204 #if defined(OS_WIN)
205 // Overridden from LegacyRenderWidgetHostHWNDDelegate:
206 virtual gfx::NativeViewAccessible GetNativeViewAccessible() OVERRIDE;
207 #endif
208
193 scoped_ptr<aura::Window> window_; 209 scoped_ptr<aura::Window> window_;
194 210
195 // The window that shows the screenshot of the history page during an 211 // The window that shows the screenshot of the history page during an
196 // overscroll navigation gesture. 212 // overscroll navigation gesture.
197 scoped_ptr<aura::Window> overscroll_window_; 213 scoped_ptr<aura::Window> overscroll_window_;
198 214
199 scoped_ptr<WindowObserver> window_observer_; 215 scoped_ptr<WindowObserver> window_observer_;
200 216
201 // The WebContentsImpl whose contents we display. 217 // The WebContentsImpl whose contents we display.
202 WebContentsImpl* web_contents_; 218 WebContentsImpl* web_contents_;
(...skipping 23 matching lines...) Expand all
226 242
227 // This manages the overlay window that shows the screenshot during a history 243 // This manages the overlay window that shows the screenshot during a history
228 // navigation triggered by the overscroll gesture. 244 // navigation triggered by the overscroll gesture.
229 scoped_ptr<OverscrollNavigationOverlay> navigation_overlay_; 245 scoped_ptr<OverscrollNavigationOverlay> navigation_overlay_;
230 246
231 scoped_ptr<ShadowLayerDelegate> overscroll_shadow_; 247 scoped_ptr<ShadowLayerDelegate> overscroll_shadow_;
232 248
233 scoped_ptr<TouchEditableImplAura> touch_editable_; 249 scoped_ptr<TouchEditableImplAura> touch_editable_;
234 scoped_ptr<GestureNavSimple> gesture_nav_simple_; 250 scoped_ptr<GestureNavSimple> gesture_nav_simple_;
235 251
252 #if defined(OS_WIN)
253 // The LegacyRenderWidgetHostHWND class provides a dummy HWND which is used
254 // for accessibility, as the container for windowless plugins like
255 // Flash/Silverlight, etc and for legacy drivers for trackpoints/trackpads,
256 // etc.
257 scoped_ptr<LegacyRenderWidgetHostHWND> legacy_hwnd_;
258 #endif
259
236 // On Windows we can run into problems if resources get released within the 260 // On Windows we can run into problems if resources get released within the
237 // initialization phase while the content (and its dimensions) are not known. 261 // initialization phase while the content (and its dimensions) are not known.
238 bool is_or_was_visible_; 262 bool is_or_was_visible_;
239 263
240 DISALLOW_COPY_AND_ASSIGN(WebContentsViewAura); 264 DISALLOW_COPY_AND_ASSIGN(WebContentsViewAura);
241 }; 265 };
242 266
243 } // namespace content 267 } // namespace content
244 268
245 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_ 269 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698