| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 // Flags passed to the TabContentsDelegate.NavigationStateChanged to tell it | 104 // Flags passed to the TabContentsDelegate.NavigationStateChanged to tell it |
| 105 // what has changed. Combine them to update more than one thing. | 105 // what has changed. Combine them to update more than one thing. |
| 106 enum InvalidateTypes { | 106 enum InvalidateTypes { |
| 107 INVALIDATE_URL = 1 << 0, // The URL has changed. | 107 INVALIDATE_URL = 1 << 0, // The URL has changed. |
| 108 INVALIDATE_TAB = 1 << 1, // The favicon, app icon, or crashed | 108 INVALIDATE_TAB = 1 << 1, // The favicon, app icon, or crashed |
| 109 // state changed. | 109 // state changed. |
| 110 INVALIDATE_LOAD = 1 << 2, // The loading state has changed. | 110 INVALIDATE_LOAD = 1 << 2, // The loading state has changed. |
| 111 INVALIDATE_PAGE_ACTIONS = 1 << 3, // Page action icons have changed. | 111 INVALIDATE_PAGE_ACTIONS = 1 << 3, // Page action icons have changed. |
| 112 INVALIDATE_BOOKMARK_BAR = 1 << 4, // State of ShouldShowBookmarkBar | 112 INVALIDATE_BOOKMARK_BAR = 1 << 4, // State of ShouldShowBookmarkBar |
| 113 // changed. | 113 // changed. |
| 114 INVALIDATE_EXTENSION_SHELF = 1 << 5, // State of | 114 INVALIDATE_TITLE = 1 << 5, // The title changed. |
| 115 // IsExtensionShelfAlwaysVisible | |
| 116 // changed. | |
| 117 INVALIDATE_TITLE = 1 << 6, // The title changed. | |
| 118 }; | 115 }; |
| 119 | 116 |
| 120 // |base_tab_contents| is used if we want to size the new tab contents view | 117 // |base_tab_contents| is used if we want to size the new tab contents view |
| 121 // based on an existing tab contents view. This can be NULL if not needed. | 118 // based on an existing tab contents view. This can be NULL if not needed. |
| 122 TabContents(Profile* profile, | 119 TabContents(Profile* profile, |
| 123 SiteInstance* site_instance, | 120 SiteInstance* site_instance, |
| 124 int routing_id, | 121 int routing_id, |
| 125 const TabContents* base_tab_contents); | 122 const TabContents* base_tab_contents); |
| 126 virtual ~TabContents(); | 123 virtual ~TabContents(); |
| 127 | 124 |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 int infobar_delegate_count() const { return infobar_delegates_.size(); } | 456 int infobar_delegate_count() const { return infobar_delegates_.size(); } |
| 460 InfoBarDelegate* GetInfoBarDelegateAt(int index) { | 457 InfoBarDelegate* GetInfoBarDelegateAt(int index) { |
| 461 return infobar_delegates_.at(index); | 458 return infobar_delegates_.at(index); |
| 462 } | 459 } |
| 463 | 460 |
| 464 // Toolbars and such --------------------------------------------------------- | 461 // Toolbars and such --------------------------------------------------------- |
| 465 | 462 |
| 466 // Returns true if a Bookmark Bar should be shown for this tab. | 463 // Returns true if a Bookmark Bar should be shown for this tab. |
| 467 virtual bool ShouldShowBookmarkBar(); | 464 virtual bool ShouldShowBookmarkBar(); |
| 468 | 465 |
| 469 // Returns whether the extension shelf should be visible. | |
| 470 virtual bool IsExtensionShelfAlwaysVisible(); | |
| 471 | |
| 472 // Notifies the delegate that a download is about to be started. | 466 // Notifies the delegate that a download is about to be started. |
| 473 // This notification is fired before a local temporary file has been created. | 467 // This notification is fired before a local temporary file has been created. |
| 474 bool CanDownload(int request_id); | 468 bool CanDownload(int request_id); |
| 475 | 469 |
| 476 // Notifies the delegate that a download started. | 470 // Notifies the delegate that a download started. |
| 477 void OnStartDownload(DownloadItem* download); | 471 void OnStartDownload(DownloadItem* download); |
| 478 | 472 |
| 479 // Notify our delegate that some of our content has animated. | 473 // Notify our delegate that some of our content has animated. |
| 480 void ToolbarSizeChanged(bool is_animating); | 474 void ToolbarSizeChanged(bool is_animating); |
| 481 | 475 |
| (...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1266 bool displaying_pdf_content_; | 1260 bool displaying_pdf_content_; |
| 1267 | 1261 |
| 1268 scoped_ptr<MatchPreview> match_preview_; | 1262 scoped_ptr<MatchPreview> match_preview_; |
| 1269 | 1263 |
| 1270 // --------------------------------------------------------------------------- | 1264 // --------------------------------------------------------------------------- |
| 1271 | 1265 |
| 1272 DISALLOW_COPY_AND_ASSIGN(TabContents); | 1266 DISALLOW_COPY_AND_ASSIGN(TabContents); |
| 1273 }; | 1267 }; |
| 1274 | 1268 |
| 1275 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 1269 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
| OLD | NEW |