OLD | NEW |
1 // Copyright (c) 2011 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 CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_TAB_CONTENTS_VIEW_VIEWS_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_TAB_CONTENTS_VIEW_VIEWS_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_TAB_CONTENTS_VIEW_VIEWS_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_TAB_CONTENTS_VIEW_VIEWS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/timer.h" | 11 #include "base/timer.h" |
12 #include "chrome/browser/tab_contents/render_view_host_delegate_helper.h" | |
13 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_view_delegate
.h" | 12 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_view_delegate
.h" |
14 #include "content/browser/tab_contents/tab_contents_view.h" | 13 #include "content/browser/tab_contents/tab_contents_view.h" |
| 14 #include "content/browser/tab_contents/tab_contents_view_helper.h" |
15 #include "ui/views/widget/widget.h" | 15 #include "ui/views/widget/widget.h" |
16 | 16 |
17 class ConstrainedWindowGtk; | 17 class ConstrainedWindowGtk; |
18 class NativeTabContentsView; | 18 class NativeTabContentsView; |
19 class RenderViewContextMenuViews; | 19 class RenderViewContextMenuViews; |
20 class SkBitmap; | 20 class SkBitmap; |
21 struct WebDropData; | 21 struct WebDropData; |
22 namespace gfx { | 22 namespace gfx { |
23 class Point; | 23 class Point; |
24 class Size; | 24 class Size; |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 void WasSized(const gfx::Size& size); | 140 void WasSized(const gfx::Size& size); |
141 | 141 |
142 // TODO(brettw) comment these. They're confusing. | 142 // TODO(brettw) comment these. They're confusing. |
143 void WheelZoom(int distance); | 143 void WheelZoom(int distance); |
144 | 144 |
145 // --------------------------------------------------------------------------- | 145 // --------------------------------------------------------------------------- |
146 | 146 |
147 // The WebContents whose contents we display. | 147 // The WebContents whose contents we display. |
148 content::WebContents* web_contents_; | 148 content::WebContents* web_contents_; |
149 | 149 |
150 // Common implementations of some RenderViewHostDelegate::View methods. | 150 // Common implementations of some TabContentsView methods. |
151 RenderViewHostDelegateViewHelper delegate_view_helper_; | 151 TabContentsViewHelper tab_contents_view_helper_; |
152 | 152 |
153 NativeTabContentsView* native_tab_contents_view_; | 153 NativeTabContentsView* native_tab_contents_view_; |
154 | 154 |
155 // The id used in the ViewStorage to store the last focused view. | 155 // The id used in the ViewStorage to store the last focused view. |
156 int last_focused_view_storage_id_; | 156 int last_focused_view_storage_id_; |
157 | 157 |
158 // The context menu. Callbacks are asynchronous so we need to keep it around. | 158 // The context menu. Callbacks are asynchronous so we need to keep it around. |
159 scoped_ptr<RenderViewContextMenuViews> context_menu_; | 159 scoped_ptr<RenderViewContextMenuViews> context_menu_; |
160 | 160 |
161 // Set to true if we want to close the tab after the system drag operation | 161 // Set to true if we want to close the tab after the system drag operation |
162 // has finished. | 162 // has finished. |
163 bool close_tab_after_drag_ends_; | 163 bool close_tab_after_drag_ends_; |
164 | 164 |
165 // Used to close the tab after the stack has unwound. | 165 // Used to close the tab after the stack has unwound. |
166 base::OneShotTimer<TabContentsViewViews> close_tab_timer_; | 166 base::OneShotTimer<TabContentsViewViews> close_tab_timer_; |
167 | 167 |
168 // The FocusManager associated with this tab. Stored as it is not directly | 168 // The FocusManager associated with this tab. Stored as it is not directly |
169 // accessible when un-parented. | 169 // accessible when un-parented. |
170 mutable const views::FocusManager* focus_manager_; | 170 mutable const views::FocusManager* focus_manager_; |
171 | 171 |
172 // The overlaid view. Owned by the caller of |InstallOverlayView|; this is a | 172 // The overlaid view. Owned by the caller of |InstallOverlayView|; this is a |
173 // weak reference. | 173 // weak reference. |
174 views::Widget* overlaid_view_; | 174 views::Widget* overlaid_view_; |
175 | 175 |
176 DISALLOW_COPY_AND_ASSIGN(TabContentsViewViews); | 176 DISALLOW_COPY_AND_ASSIGN(TabContentsViewViews); |
177 }; | 177 }; |
178 | 178 |
179 #endif // CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_TAB_CONTENTS_VIEW_VIEWS_H_ | 179 #endif // CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_TAB_CONTENTS_VIEW_VIEWS_H_ |
OLD | NEW |