| 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_TAB_CONTENTS_TAB_CONTENTS_VIEW_AURA_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_ |
| 6 #define CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_AURA_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "content/browser/tab_contents/tab_contents_view_helper.h" | 11 #include "content/browser/web_contents/web_contents_view_helper.h" |
| 12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
| 13 #include "content/public/browser/web_contents_view.h" | 13 #include "content/public/browser/web_contents_view.h" |
| 14 #include "ui/aura/client/drag_drop_delegate.h" | 14 #include "ui/aura/client/drag_drop_delegate.h" |
| 15 #include "ui/aura/window_delegate.h" | 15 #include "ui/aura/window_delegate.h" |
| 16 | 16 |
| 17 namespace aura { | 17 namespace aura { |
| 18 class Window; | 18 class Window; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace content { | 21 namespace content { |
| 22 class WebContentsViewDelegate; | 22 class WebContentsViewDelegate; |
| 23 class WebDragDestDelegate; | 23 class WebDragDestDelegate; |
| 24 } | 24 } |
| 25 | 25 |
| 26 class CONTENT_EXPORT TabContentsViewAura | 26 class CONTENT_EXPORT WebContentsViewAura |
| 27 : public content::WebContentsView, | 27 : public content::WebContentsView, |
| 28 public aura::WindowDelegate, | 28 public aura::WindowDelegate, |
| 29 public aura::client::DragDropDelegate { | 29 public aura::client::DragDropDelegate { |
| 30 public: | 30 public: |
| 31 TabContentsViewAura(WebContentsImpl* web_contents, | 31 WebContentsViewAura(WebContentsImpl* web_contents, |
| 32 content::WebContentsViewDelegate* delegate); | 32 content::WebContentsViewDelegate* delegate); |
| 33 virtual ~TabContentsViewAura(); | 33 virtual ~WebContentsViewAura(); |
| 34 | 34 |
| 35 private: | 35 private: |
| 36 void SizeChangedCommon(const gfx::Size& size); | 36 void SizeChangedCommon(const gfx::Size& size); |
| 37 | 37 |
| 38 void EndDrag(WebKit::WebDragOperationsMask ops); | 38 void EndDrag(WebKit::WebDragOperationsMask ops); |
| 39 | 39 |
| 40 content::WebDragDestDelegate* GetDragDestDelegate(); | 40 content::WebDragDestDelegate* GetDragDestDelegate(); |
| 41 | 41 |
| 42 // Overridden from WebContentsView: | 42 // Overridden from WebContentsView: |
| 43 virtual void CreateView(const gfx::Size& initial_size) OVERRIDE; | 43 virtual void CreateView(const gfx::Size& initial_size) OVERRIDE; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 scoped_ptr<aura::Window> window_; | 122 scoped_ptr<aura::Window> window_; |
| 123 | 123 |
| 124 // The WebContentsImpl whose contents we display. | 124 // The WebContentsImpl whose contents we display. |
| 125 WebContentsImpl* tab_contents_; | 125 WebContentsImpl* tab_contents_; |
| 126 | 126 |
| 127 content::RenderWidgetHostView* view_; | 127 content::RenderWidgetHostView* view_; |
| 128 | 128 |
| 129 scoped_ptr<content::WebContentsViewDelegate> delegate_; | 129 scoped_ptr<content::WebContentsViewDelegate> delegate_; |
| 130 | 130 |
| 131 // Common implementations of some WebContentsView methods. | 131 // Common implementations of some WebContentsView methods. |
| 132 TabContentsViewHelper tab_contents_view_helper_; | 132 WebContentsViewHelper web_contents_view_helper_; |
| 133 | 133 |
| 134 WebKit::WebDragOperationsMask current_drag_op_; | 134 WebKit::WebDragOperationsMask current_drag_op_; |
| 135 | 135 |
| 136 // Set to true if we want to close the tab after the system drag operation | 136 // Set to true if we want to close the tab after the system drag operation |
| 137 // has finished. | 137 // has finished. |
| 138 bool close_tab_after_drag_ends_; | 138 bool close_tab_after_drag_ends_; |
| 139 | 139 |
| 140 DISALLOW_COPY_AND_ASSIGN(TabContentsViewAura); | 140 DISALLOW_COPY_AND_ASSIGN(WebContentsViewAura); |
| 141 }; | 141 }; |
| 142 | 142 |
| 143 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_AURA_H_ | 143 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_ |
| OLD | NEW |