OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_TAB_CONTENTS_TAB_CONTENTS_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 | 10 |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 // us not to store focus when a tab is being closed. | 311 // us not to store focus when a tab is being closed. |
312 bool is_being_destroyed() const { return is_being_destroyed_; } | 312 bool is_being_destroyed() const { return is_being_destroyed_; } |
313 | 313 |
314 // Convenience method for notifying the delegate of a navigation state | 314 // Convenience method for notifying the delegate of a navigation state |
315 // change. See TabContentsDelegate. | 315 // change. See TabContentsDelegate. |
316 void NotifyNavigationStateChanged(unsigned changed_flags); | 316 void NotifyNavigationStateChanged(unsigned changed_flags); |
317 | 317 |
318 // Invoked when the tab contents becomes selected. If you override, be sure | 318 // Invoked when the tab contents becomes selected. If you override, be sure |
319 // and invoke super's implementation. | 319 // and invoke super's implementation. |
320 virtual void DidBecomeSelected(); | 320 virtual void DidBecomeSelected(); |
| 321 base::TimeTicks last_selected_time() const { |
| 322 return last_selected_time_; |
| 323 } |
321 | 324 |
322 // Invoked when the tab contents becomes hidden. | 325 // Invoked when the tab contents becomes hidden. |
323 // NOTE: If you override this, call the superclass version too! | 326 // NOTE: If you override this, call the superclass version too! |
324 virtual void WasHidden(); | 327 virtual void WasHidden(); |
325 | 328 |
326 // Activates this contents within its containing window, bringing that window | 329 // Activates this contents within its containing window, bringing that window |
327 // to the foreground if necessary. | 330 // to the foreground if necessary. |
328 void Activate(); | 331 void Activate(); |
329 | 332 |
330 // Deactivates this contents by deactivating its containing window. | 333 // Deactivates this contents by deactivating its containing window. |
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1246 // If this tab was created from a renderer using window.open, this will be | 1249 // If this tab was created from a renderer using window.open, this will be |
1247 // non-NULL and represent the DOMUI of the opening renderer. | 1250 // non-NULL and represent the DOMUI of the opening renderer. |
1248 DOMUITypeID opener_dom_ui_type_; | 1251 DOMUITypeID opener_dom_ui_type_; |
1249 | 1252 |
1250 // The time that we started to create the new tab page. | 1253 // The time that we started to create the new tab page. |
1251 base::TimeTicks new_tab_start_time_; | 1254 base::TimeTicks new_tab_start_time_; |
1252 | 1255 |
1253 // The time that we started to close the tab. | 1256 // The time that we started to close the tab. |
1254 base::TimeTicks tab_close_start_time_; | 1257 base::TimeTicks tab_close_start_time_; |
1255 | 1258 |
| 1259 // The time that this tab was last selected. |
| 1260 base::TimeTicks last_selected_time_; |
| 1261 |
1256 // Information about the language the page is in and has been translated to. | 1262 // Information about the language the page is in and has been translated to. |
1257 LanguageState language_state_; | 1263 LanguageState language_state_; |
1258 | 1264 |
1259 // See description above setter. | 1265 // See description above setter. |
1260 bool closed_by_user_gesture_; | 1266 bool closed_by_user_gesture_; |
1261 | 1267 |
1262 // See description in RenderViewHostDelegate::SetDisplayingPDFContent. | 1268 // See description in RenderViewHostDelegate::SetDisplayingPDFContent. |
1263 bool displaying_pdf_content_; | 1269 bool displaying_pdf_content_; |
1264 | 1270 |
1265 scoped_ptr<MatchPreview> match_preview_; | 1271 scoped_ptr<MatchPreview> match_preview_; |
1266 | 1272 |
1267 // --------------------------------------------------------------------------- | 1273 // --------------------------------------------------------------------------- |
1268 | 1274 |
1269 DISALLOW_COPY_AND_ASSIGN(TabContents); | 1275 DISALLOW_COPY_AND_ASSIGN(TabContents); |
1270 }; | 1276 }; |
1271 | 1277 |
1272 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 1278 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
OLD | NEW |