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 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
645 // Set the time when we started to create the new tab page. This time is | 645 // Set the time when we started to create the new tab page. This time is |
646 // from before we created this TabContents. | 646 // from before we created this TabContents. |
647 void set_new_tab_start_time(const base::TimeTicks& time) { | 647 void set_new_tab_start_time(const base::TimeTicks& time) { |
648 new_tab_start_time_ = time; | 648 new_tab_start_time_ = time; |
649 } | 649 } |
650 | 650 |
651 // Notification that tab closing has started. This can be called multiple | 651 // Notification that tab closing has started. This can be called multiple |
652 // times, subsequent calls are ignored. | 652 // times, subsequent calls are ignored. |
653 void OnCloseStarted(); | 653 void OnCloseStarted(); |
654 | 654 |
655 // Getter/Setters for the url request context to be used for this tab. | |
656 void set_request_context(URLRequestContextGetter* context); | |
657 URLRequestContextGetter* request_context() const { | |
658 return request_context_.get(); | |
659 } | |
660 | |
661 LanguageState& language_state() { | 655 LanguageState& language_state() { |
662 return language_state_; | 656 return language_state_; |
663 } | 657 } |
664 | 658 |
665 // Returns true if underlying TabContentsView should accept drag-n-drop. | 659 // Returns true if underlying TabContentsView should accept drag-n-drop. |
666 bool ShouldAcceptDragAndDrop() const; | 660 bool ShouldAcceptDragAndDrop() const; |
667 | 661 |
668 // Creates a duplicate of this TabContents. The returned TabContents is | 662 // Creates a duplicate of this TabContents. The returned TabContents is |
669 // configured such that the renderer has not been loaded (it'll load the first | 663 // configured such that the renderer has not been loaded (it'll load the first |
670 // time it is selected). | 664 // time it is selected). |
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1258 // If this tab was created from a renderer using window.open, this will be | 1252 // If this tab was created from a renderer using window.open, this will be |
1259 // non-NULL and represent the DOMUI of the opening renderer. | 1253 // non-NULL and represent the DOMUI of the opening renderer. |
1260 DOMUITypeID opener_dom_ui_type_; | 1254 DOMUITypeID opener_dom_ui_type_; |
1261 | 1255 |
1262 // The time that we started to create the new tab page. | 1256 // The time that we started to create the new tab page. |
1263 base::TimeTicks new_tab_start_time_; | 1257 base::TimeTicks new_tab_start_time_; |
1264 | 1258 |
1265 // The time that we started to close the tab. | 1259 // The time that we started to close the tab. |
1266 base::TimeTicks tab_close_start_time_; | 1260 base::TimeTicks tab_close_start_time_; |
1267 | 1261 |
1268 // Contextual information to be used for requests created here. | |
1269 // Can be NULL in which case we defer to the request context from the | |
1270 // profile | |
1271 scoped_refptr<URLRequestContextGetter> request_context_; | |
1272 | |
1273 // 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. |
1274 LanguageState language_state_; | 1263 LanguageState language_state_; |
1275 | 1264 |
1276 // See description above setter. | 1265 // See description above setter. |
1277 bool closed_by_user_gesture_; | 1266 bool closed_by_user_gesture_; |
1278 | 1267 |
1279 // See description in RenderViewHostDelegate::SetDisplayingPDFContent. | 1268 // See description in RenderViewHostDelegate::SetDisplayingPDFContent. |
1280 bool displaying_pdf_content_; | 1269 bool displaying_pdf_content_; |
1281 | 1270 |
1282 // --------------------------------------------------------------------------- | 1271 // --------------------------------------------------------------------------- |
1283 | 1272 |
1284 DISALLOW_COPY_AND_ASSIGN(TabContents); | 1273 DISALLOW_COPY_AND_ASSIGN(TabContents); |
1285 }; | 1274 }; |
1286 | 1275 |
1287 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 1276 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
OLD | NEW |