OLD | NEW |
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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 | 190 |
180 // Overridden from aura::WindowObserver: | 191 // Overridden from aura::WindowObserver: |
181 virtual void OnWindowParentChanged(aura::Window* window, | 192 virtual void OnWindowParentChanged(aura::Window* window, |
182 aura::Window* parent) OVERRIDE; | 193 aura::Window* parent) OVERRIDE; |
183 virtual void OnWindowVisibilityChanged(aura::Window* window, | 194 virtual void OnWindowVisibilityChanged(aura::Window* window, |
184 bool visible) OVERRIDE; | 195 bool visible) OVERRIDE; |
185 | 196 |
186 // Update the web contents visiblity. | 197 // Update the web contents visiblity. |
187 void UpdateWebContentsVisibility(bool visible); | 198 void UpdateWebContentsVisibility(bool visible); |
188 | 199 |
| 200 #if defined(OS_WIN) |
| 201 // Overridden from LegacyRenderWidgetHostHWNDDelegate: |
| 202 virtual gfx::NativeViewAccessible GetNativeViewAccessible() OVERRIDE; |
| 203 #endif |
| 204 |
189 scoped_ptr<aura::Window> window_; | 205 scoped_ptr<aura::Window> window_; |
190 | 206 |
191 // The window that shows the screenshot of the history page during an | 207 // The window that shows the screenshot of the history page during an |
192 // overscroll navigation gesture. | 208 // overscroll navigation gesture. |
193 scoped_ptr<aura::Window> overscroll_window_; | 209 scoped_ptr<aura::Window> overscroll_window_; |
194 | 210 |
195 scoped_ptr<WindowObserver> window_observer_; | 211 scoped_ptr<WindowObserver> window_observer_; |
196 | 212 |
197 // The WebContentsImpl whose contents we display. | 213 // The WebContentsImpl whose contents we display. |
198 WebContentsImpl* web_contents_; | 214 WebContentsImpl* web_contents_; |
(...skipping 23 matching lines...) Expand all Loading... |
222 | 238 |
223 // This manages the overlay window that shows the screenshot during a history | 239 // This manages the overlay window that shows the screenshot during a history |
224 // navigation triggered by the overscroll gesture. | 240 // navigation triggered by the overscroll gesture. |
225 scoped_ptr<OverscrollNavigationOverlay> navigation_overlay_; | 241 scoped_ptr<OverscrollNavigationOverlay> navigation_overlay_; |
226 | 242 |
227 scoped_ptr<ShadowLayerDelegate> overscroll_shadow_; | 243 scoped_ptr<ShadowLayerDelegate> overscroll_shadow_; |
228 | 244 |
229 scoped_ptr<TouchEditableImplAura> touch_editable_; | 245 scoped_ptr<TouchEditableImplAura> touch_editable_; |
230 scoped_ptr<GestureNavSimple> gesture_nav_simple_; | 246 scoped_ptr<GestureNavSimple> gesture_nav_simple_; |
231 | 247 |
| 248 #if defined(OS_WIN) |
| 249 scoped_ptr<LegacyRenderWidgetHostHWND> legacy_hwnd_; |
| 250 #endif |
| 251 |
232 // On Windows we can run into problems if resources get released within the | 252 // On Windows we can run into problems if resources get released within the |
233 // initialization phase while the content (and its dimensions) are not known. | 253 // initialization phase while the content (and its dimensions) are not known. |
234 bool is_or_was_visible_; | 254 bool is_or_was_visible_; |
235 | 255 |
236 DISALLOW_COPY_AND_ASSIGN(WebContentsViewAura); | 256 DISALLOW_COPY_AND_ASSIGN(WebContentsViewAura); |
237 }; | 257 }; |
238 | 258 |
239 } // namespace content | 259 } // namespace content |
240 | 260 |
241 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_ | 261 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_ |
OLD | NEW |