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 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 | 9 |
10 #include <deque> | 10 #include <deque> |
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
637 // Set the time when we started to create the new tab page. This time is | 637 // Set the time when we started to create the new tab page. This time is |
638 // from before we created this TabContents. | 638 // from before we created this TabContents. |
639 void set_new_tab_start_time(const base::TimeTicks& time) { | 639 void set_new_tab_start_time(const base::TimeTicks& time) { |
640 new_tab_start_time_ = time; | 640 new_tab_start_time_ = time; |
641 } | 641 } |
642 | 642 |
643 // Notification that tab closing has started. This can be called multiple | 643 // Notification that tab closing has started. This can be called multiple |
644 // times, subsequent calls are ignored. | 644 // times, subsequent calls are ignored. |
645 void OnCloseStarted(); | 645 void OnCloseStarted(); |
646 | 646 |
647 // Getter/Setters for the url request context to be used for this tab. | |
648 void set_request_context(URLRequestContextGetter* context); | |
649 URLRequestContextGetter* request_context() const { | |
650 return request_context_.get(); | |
651 } | |
652 | |
653 LanguageState& language_state() { | 647 LanguageState& language_state() { |
654 return language_state_; | 648 return language_state_; |
655 } | 649 } |
656 | 650 |
657 // Returns true if underlying TabContentsView should accept drag-n-drop. | 651 // Returns true if underlying TabContentsView should accept drag-n-drop. |
658 bool ShouldAcceptDragAndDrop() const; | 652 bool ShouldAcceptDragAndDrop() const; |
659 | 653 |
660 // Creates a duplicate of this TabContents. The returned TabContents is | 654 // Creates a duplicate of this TabContents. The returned TabContents is |
661 // configured such that the renderer has not been loaded (it'll load the first | 655 // configured such that the renderer has not been loaded (it'll load the first |
662 // time it is selected). | 656 // time it is selected). |
(...skipping 583 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 | 1240 // 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. | 1241 // non-NULL and represent the DOMUI of the opening renderer. |
1248 DOMUITypeID opener_dom_ui_type_; | 1242 DOMUITypeID opener_dom_ui_type_; |
1249 | 1243 |
1250 // The time that we started to create the new tab page. | 1244 // The time that we started to create the new tab page. |
1251 base::TimeTicks new_tab_start_time_; | 1245 base::TimeTicks new_tab_start_time_; |
1252 | 1246 |
1253 // The time that we started to close the tab. | 1247 // The time that we started to close the tab. |
1254 base::TimeTicks tab_close_start_time_; | 1248 base::TimeTicks tab_close_start_time_; |
1255 | 1249 |
1256 // Contextual information to be used for requests created here. | |
1257 // Can be NULL in which case we defer to the request context from the | |
1258 // profile | |
1259 scoped_refptr<URLRequestContextGetter> request_context_; | |
1260 | |
1261 // Information about the language the page is in and has been translated to. | 1250 // Information about the language the page is in and has been translated to. |
1262 LanguageState language_state_; | 1251 LanguageState language_state_; |
1263 | 1252 |
1264 // See description above setter. | 1253 // See description above setter. |
1265 bool closed_by_user_gesture_; | 1254 bool closed_by_user_gesture_; |
1266 | 1255 |
1267 // See description in RenderViewHostDelegate::SetDisplayingPDFContent. | 1256 // See description in RenderViewHostDelegate::SetDisplayingPDFContent. |
1268 bool displaying_pdf_content_; | 1257 bool displaying_pdf_content_; |
1269 | 1258 |
1270 // --------------------------------------------------------------------------- | 1259 // --------------------------------------------------------------------------- |
1271 | 1260 |
1272 DISALLOW_COPY_AND_ASSIGN(TabContents); | 1261 DISALLOW_COPY_AND_ASSIGN(TabContents); |
1273 }; | 1262 }; |
1274 | 1263 |
1275 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 1264 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
OLD | NEW |