Chromium Code Reviews| 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" |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 31 class CONTENT_EXPORT WebContentsViewAura | 31 class CONTENT_EXPORT WebContentsViewAura |
| 32 : public WebContentsView, | 32 : public WebContentsView, |
| 33 public RenderViewHostDelegateView, | 33 public RenderViewHostDelegateView, |
| 34 public aura::WindowDelegate, | 34 public aura::WindowDelegate, |
| 35 public aura::client::DragDropDelegate { | 35 public aura::client::DragDropDelegate { |
| 36 public: | 36 public: |
| 37 WebContentsViewAura(WebContentsImpl* web_contents, | 37 WebContentsViewAura(WebContentsImpl* web_contents, |
| 38 WebContentsViewDelegate* delegate); | 38 WebContentsViewDelegate* delegate); |
| 39 | 39 |
| 40 private: | 40 private: |
| 41 class WindowObserver; | |
| 42 friend class WindowObserver; | |
|
sky
2012/11/19 15:04:54
nit: you don't need to friend inner classes. Inner
jam
2012/11/19 18:53:06
Done.
| |
| 43 | |
| 41 virtual ~WebContentsViewAura(); | 44 virtual ~WebContentsViewAura(); |
| 42 | 45 |
| 43 void SizeChangedCommon(const gfx::Size& size); | 46 void SizeChangedCommon(const gfx::Size& size); |
| 44 | 47 |
| 45 void EndDrag(WebKit::WebDragOperationsMask ops); | 48 void EndDrag(WebKit::WebDragOperationsMask ops); |
| 46 | 49 |
| 47 // Overridden from WebContentsView: | 50 // Overridden from WebContentsView: |
| 48 virtual void CreateView(const gfx::Size& initial_size) OVERRIDE; | 51 virtual void CreateView(const gfx::Size& initial_size) OVERRIDE; |
| 49 virtual RenderWidgetHostView* CreateViewForWidget( | 52 virtual RenderWidgetHostView* CreateViewForWidget( |
| 50 RenderWidgetHost* render_widget_host) OVERRIDE; | 53 RenderWidgetHost* render_widget_host) OVERRIDE; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 115 virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE; | 118 virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE; |
| 116 | 119 |
| 117 // Overridden from aura::client::DragDropDelegate: | 120 // Overridden from aura::client::DragDropDelegate: |
| 118 virtual void OnDragEntered(const ui::DropTargetEvent& event) OVERRIDE; | 121 virtual void OnDragEntered(const ui::DropTargetEvent& event) OVERRIDE; |
| 119 virtual int OnDragUpdated(const ui::DropTargetEvent& event) OVERRIDE; | 122 virtual int OnDragUpdated(const ui::DropTargetEvent& event) OVERRIDE; |
| 120 virtual void OnDragExited() OVERRIDE; | 123 virtual void OnDragExited() OVERRIDE; |
| 121 virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE; | 124 virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE; |
| 122 | 125 |
| 123 scoped_ptr<aura::Window> window_; | 126 scoped_ptr<aura::Window> window_; |
| 124 | 127 |
| 128 scoped_ptr<WindowObserver> window_observer_; | |
| 129 | |
| 125 // The WebContentsImpl whose contents we display. | 130 // The WebContentsImpl whose contents we display. |
| 126 WebContentsImpl* web_contents_; | 131 WebContentsImpl* web_contents_; |
| 127 | 132 |
| 128 RenderWidgetHostView* view_; | 133 RenderWidgetHostView* view_; |
| 129 | 134 |
| 130 scoped_ptr<WebContentsViewDelegate> delegate_; | 135 scoped_ptr<WebContentsViewDelegate> delegate_; |
| 131 | 136 |
| 132 WebKit::WebDragOperationsMask current_drag_op_; | 137 WebKit::WebDragOperationsMask current_drag_op_; |
| 133 | 138 |
| 134 scoped_ptr<WebDropData> current_drop_data_; | 139 scoped_ptr<WebDropData> current_drop_data_; |
| 135 | 140 |
| 136 WebDragDestDelegate* drag_dest_delegate_; | 141 WebDragDestDelegate* drag_dest_delegate_; |
| 137 | 142 |
| 138 // We keep track of the render view host we're dragging over. If it changes | 143 // We keep track of the render view host we're dragging over. If it changes |
| 139 // during a drag, we need to re-send the DragEnter message. WARNING: | 144 // during a drag, we need to re-send the DragEnter message. WARNING: |
| 140 // this pointer should never be dereferenced. We only use it for comparing | 145 // this pointer should never be dereferenced. We only use it for comparing |
| 141 // pointers. | 146 // pointers. |
| 142 void* current_rvh_for_drag_; | 147 void* current_rvh_for_drag_; |
| 143 | 148 |
| 144 DISALLOW_COPY_AND_ASSIGN(WebContentsViewAura); | 149 DISALLOW_COPY_AND_ASSIGN(WebContentsViewAura); |
| 145 }; | 150 }; |
| 146 | 151 |
| 147 } // namespace content | 152 } // namespace content |
| 148 | 153 |
| 149 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_ | 154 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_ |
| OLD | NEW |