| 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/compositor/layer_animation_observer.h" | 18 #include "ui/compositor/layer_animation_observer.h" |
| 18 #include "ui/wm/public/drag_drop_delegate.h" | 19 #include "ui/wm/public/drag_drop_delegate.h" |
| 19 | 20 |
| 20 namespace aura { | 21 namespace aura { |
| 21 class Window; | 22 class Window; |
| 22 } | 23 } |
| 23 | 24 |
| 24 namespace ui { | 25 namespace ui { |
| 25 class DropTargetEvent; | 26 class DropTargetEvent; |
| 26 } | 27 } |
| 27 | 28 |
| 28 namespace content { | 29 namespace content { |
| 29 class GestureNavSimple; | 30 class GestureNavSimple; |
| 30 class OverscrollNavigationOverlay; | 31 class OverscrollNavigationOverlay; |
| 31 class RenderWidgetHostImpl; | 32 class RenderWidgetHostImpl; |
| 32 class ShadowLayerDelegate; | 33 class ShadowLayerDelegate; |
| 33 class TouchEditableImplAura; | 34 class TouchEditableImplAura; |
| 34 class WebContentsViewDelegate; | 35 class WebContentsViewDelegate; |
| 35 class WebContentsImpl; | 36 class WebContentsImpl; |
| 36 class WebDragDestDelegate; | 37 class WebDragDestDelegate; |
| 37 | 38 |
| 38 class WebContentsViewAura | 39 class WebContentsViewAura |
| 39 : public WebContentsView, | 40 : public WebContentsView, |
| 40 public RenderViewHostDelegateView, | 41 public RenderViewHostDelegateView, |
| 41 public OverscrollControllerDelegate, | 42 public OverscrollControllerDelegate, |
| 42 public ui::ImplicitAnimationObserver, | 43 public ui::ImplicitAnimationObserver, |
| 43 public aura::WindowDelegate, | 44 public aura::WindowDelegate, |
| 44 public aura::client::DragDropDelegate { | 45 public aura::client::DragDropDelegate, |
| 46 public aura::WindowObserver { |
| 45 public: | 47 public: |
| 46 WebContentsViewAura(WebContentsImpl* web_contents, | 48 WebContentsViewAura(WebContentsImpl* web_contents, |
| 47 WebContentsViewDelegate* delegate); | 49 WebContentsViewDelegate* delegate); |
| 48 | 50 |
| 49 CONTENT_EXPORT void SetupOverlayWindowForTesting(); | 51 CONTENT_EXPORT void SetupOverlayWindowForTesting(); |
| 50 | 52 |
| 51 CONTENT_EXPORT void SetTouchEditableForTest( | 53 CONTENT_EXPORT void SetTouchEditableForTest( |
| 52 TouchEditableImplAura* touch_editable); | 54 TouchEditableImplAura* touch_editable); |
| 53 | 55 |
| 54 private: | 56 private: |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 // Overridden from ui::EventHandler: | 171 // Overridden from ui::EventHandler: |
| 170 virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE; | 172 virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE; |
| 171 virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE; | 173 virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE; |
| 172 | 174 |
| 173 // Overridden from aura::client::DragDropDelegate: | 175 // Overridden from aura::client::DragDropDelegate: |
| 174 virtual void OnDragEntered(const ui::DropTargetEvent& event) OVERRIDE; | 176 virtual void OnDragEntered(const ui::DropTargetEvent& event) OVERRIDE; |
| 175 virtual int OnDragUpdated(const ui::DropTargetEvent& event) OVERRIDE; | 177 virtual int OnDragUpdated(const ui::DropTargetEvent& event) OVERRIDE; |
| 176 virtual void OnDragExited() OVERRIDE; | 178 virtual void OnDragExited() OVERRIDE; |
| 177 virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE; | 179 virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE; |
| 178 | 180 |
| 181 // Overridden from aura::WindowObserver: |
| 182 virtual void OnWindowParentChanged(aura::Window* window, |
| 183 aura::Window* parent) OVERRIDE; |
| 184 virtual void OnWindowVisibilityChanged(aura::Window* window, |
| 185 bool visible) OVERRIDE; |
| 186 |
| 179 scoped_ptr<aura::Window> window_; | 187 scoped_ptr<aura::Window> window_; |
| 180 | 188 |
| 181 // The window that shows the screenshot of the history page during an | 189 // The window that shows the screenshot of the history page during an |
| 182 // overscroll navigation gesture. | 190 // overscroll navigation gesture. |
| 183 scoped_ptr<aura::Window> overscroll_window_; | 191 scoped_ptr<aura::Window> overscroll_window_; |
| 184 | 192 |
| 185 scoped_ptr<WindowObserver> window_observer_; | 193 scoped_ptr<WindowObserver> window_observer_; |
| 186 | 194 |
| 187 // The WebContentsImpl whose contents we display. | 195 // The WebContentsImpl whose contents we display. |
| 188 WebContentsImpl* web_contents_; | 196 WebContentsImpl* web_contents_; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 218 | 226 |
| 219 scoped_ptr<TouchEditableImplAura> touch_editable_; | 227 scoped_ptr<TouchEditableImplAura> touch_editable_; |
| 220 scoped_ptr<GestureNavSimple> gesture_nav_simple_; | 228 scoped_ptr<GestureNavSimple> gesture_nav_simple_; |
| 221 | 229 |
| 222 DISALLOW_COPY_AND_ASSIGN(WebContentsViewAura); | 230 DISALLOW_COPY_AND_ASSIGN(WebContentsViewAura); |
| 223 }; | 231 }; |
| 224 | 232 |
| 225 } // namespace content | 233 } // namespace content |
| 226 | 234 |
| 227 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_ | 235 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_ |
| OLD | NEW |