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

Side by Side Diff: content/browser/web_contents/web_contents_view_aura.h

Issue 1987903002: Create only a single LegacyRenderWidgetHostHWND per WebContentsViewAura. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix last merge issue Created 4 years, 7 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 <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/gtest_prod_util.h" 11 #include "base/gtest_prod_util.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "content/browser/renderer_host/overscroll_controller_delegate.h" 14 #include "content/browser/renderer_host/overscroll_controller_delegate.h"
15 #include "content/browser/renderer_host/render_view_host_delegate_view.h" 15 #include "content/browser/renderer_host/render_view_host_delegate_view.h"
16 #include "content/browser/web_contents/web_contents_view.h" 16 #include "content/browser/web_contents/web_contents_view.h"
17 #include "content/common/content_export.h" 17 #include "content/common/content_export.h"
18 #include "ui/aura/window_delegate.h" 18 #include "ui/aura/window_delegate.h"
19 #include "ui/aura/window_observer.h" 19 #include "ui/aura/window_observer.h"
20 #include "ui/wm/public/drag_drop_delegate.h" 20 #include "ui/wm/public/drag_drop_delegate.h"
21 21
22 #if defined(OS_WIN)
23 #include "content/browser/renderer_host/legacy_render_widget_host_win.h"
24 #include "content/browser/renderer_host/legacy_render_widget_host_win_delegate.h "
25 #endif
26
22 namespace aura { 27 namespace aura {
23 class Window; 28 class Window;
24 } 29 }
25 30
26 namespace ui { 31 namespace ui {
27 class DropTargetEvent; 32 class DropTargetEvent;
28 class TouchSelectionController; 33 class TouchSelectionController;
29 } 34 }
30 35
31 namespace content { 36 namespace content {
32 class GestureNavSimple; 37 class GestureNavSimple;
33 class OverscrollNavigationOverlay; 38 class OverscrollNavigationOverlay;
34 class RenderWidgetHostImpl; 39 class RenderWidgetHostImpl;
35 class RenderWidgetHostViewAura; 40 class RenderWidgetHostViewAura;
36 class ShadowLayerDelegate; 41 class ShadowLayerDelegate;
37 class TouchSelectionControllerClientAura; 42 class TouchSelectionControllerClientAura;
38 class WebContentsViewDelegate; 43 class WebContentsViewDelegate;
39 class WebContentsImpl; 44 class WebContentsImpl;
40 class WebDragDestDelegate; 45 class WebDragDestDelegate;
41 46
47 #if defined(OS_WIN)
48 class LegacyRenderWidgetHostHWND;
49 #endif
50
42 class CONTENT_EXPORT WebContentsViewAura 51 class CONTENT_EXPORT WebContentsViewAura
43 : NON_EXPORTED_BASE(public WebContentsView), 52 : NON_EXPORTED_BASE(public WebContentsView),
53 #if defined(OS_WIN)
54 public LegacyRenderWidgetHostHWNDDelegate,
55 #endif
44 public RenderViewHostDelegateView, 56 public RenderViewHostDelegateView,
45 public OverscrollControllerDelegate, 57 public OverscrollControllerDelegate,
46 public aura::WindowDelegate, 58 public aura::WindowDelegate,
47 public aura::client::DragDropDelegate, 59 public aura::client::DragDropDelegate,
48 public aura::WindowObserver { 60 public aura::WindowObserver {
49 public: 61 public:
50 WebContentsViewAura(WebContentsImpl* web_contents, 62 WebContentsViewAura(WebContentsImpl* web_contents,
51 WebContentsViewDelegate* delegate); 63 WebContentsViewDelegate* delegate);
52 64
53 // Allow the WebContentsViewDelegate to be set explicitly. 65 // Allow the WebContentsViewDelegate to be set explicitly.
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 void OnDragEntered(const ui::DropTargetEvent& event) override; 161 void OnDragEntered(const ui::DropTargetEvent& event) override;
150 int OnDragUpdated(const ui::DropTargetEvent& event) override; 162 int OnDragUpdated(const ui::DropTargetEvent& event) override;
151 void OnDragExited() override; 163 void OnDragExited() override;
152 int OnPerformDrop(const ui::DropTargetEvent& event) override; 164 int OnPerformDrop(const ui::DropTargetEvent& event) override;
153 165
154 // Overridden from aura::WindowObserver: 166 // Overridden from aura::WindowObserver:
155 void OnWindowVisibilityChanged(aura::Window* window, bool visible) override; 167 void OnWindowVisibilityChanged(aura::Window* window, bool visible) override;
156 168
157 FRIEND_TEST_ALL_PREFIXES(WebContentsViewAuraTest, EnableDisableOverscroll); 169 FRIEND_TEST_ALL_PREFIXES(WebContentsViewAuraTest, EnableDisableOverscroll);
158 170
171 #if defined(OS_WIN)
172 // Overridden from LegacyRenderWidgetHostHWNDDelegate:
173 gfx::NativeViewAccessible GetNativeViewAccessible() override;
174 #endif
175
159 std::unique_ptr<aura::Window> window_; 176 std::unique_ptr<aura::Window> window_;
160 177
161 std::unique_ptr<WindowObserver> window_observer_; 178 std::unique_ptr<WindowObserver> window_observer_;
162 179
163 // The WebContentsImpl whose contents we display. 180 // The WebContentsImpl whose contents we display.
164 WebContentsImpl* web_contents_; 181 WebContentsImpl* web_contents_;
165 182
166 std::unique_ptr<WebContentsViewDelegate> delegate_; 183 std::unique_ptr<WebContentsViewDelegate> delegate_;
167 184
168 blink::WebDragOperationsMask current_drag_op_; 185 blink::WebDragOperationsMask current_drag_op_;
(...skipping 14 matching lines...) Expand all
183 // This is the completed overscroll gesture. This is used for the animation 200 // This is the completed overscroll gesture. This is used for the animation
184 // callback that happens in response to a completed overscroll gesture. 201 // callback that happens in response to a completed overscroll gesture.
185 OverscrollMode completed_overscroll_gesture_; 202 OverscrollMode completed_overscroll_gesture_;
186 203
187 // This manages the overlay window that shows the screenshot during a history 204 // This manages the overlay window that shows the screenshot during a history
188 // navigation triggered by the overscroll gesture. 205 // navigation triggered by the overscroll gesture.
189 std::unique_ptr<OverscrollNavigationOverlay> navigation_overlay_; 206 std::unique_ptr<OverscrollNavigationOverlay> navigation_overlay_;
190 207
191 std::unique_ptr<GestureNavSimple> gesture_nav_simple_; 208 std::unique_ptr<GestureNavSimple> gesture_nav_simple_;
192 209
210 #if defined(OS_WIN)
211 // The LegacyRenderWidgetHostHWND class provides a dummy HWND which is used
212 // for accessibility, as the container for windowless plugins like
213 // Flash/Silverlight, etc and for legacy drivers for trackpoints/trackpads,
214 // etc.
215 std::unique_ptr<LegacyRenderWidgetHostHWND> legacy_hwnd_;
216 #endif
217
218 // On Windows we can run into problems if resources get released within the
219 // initialization phase while the content (and its dimensions) are not known.
220 bool is_or_was_visible_;
221
193 DISALLOW_COPY_AND_ASSIGN(WebContentsViewAura); 222 DISALLOW_COPY_AND_ASSIGN(WebContentsViewAura);
194 }; 223 };
195 224
196 } // namespace content 225 } // namespace content
197 226
198 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_ 227 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.cc ('k') | content/browser/web_contents/web_contents_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698