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 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
451 // the page contents. The view calls this function when the tab is focused | 451 // the page contents. The view calls this function when the tab is focused |
452 // to see what it should do. | 452 // to see what it should do. |
453 virtual bool FocusLocationBarByDefault(); | 453 virtual bool FocusLocationBarByDefault(); |
454 | 454 |
455 // Focuses the location bar. | 455 // Focuses the location bar. |
456 virtual void SetFocusToLocationBar(bool select_all); | 456 virtual void SetFocusToLocationBar(bool select_all); |
457 | 457 |
458 // Infobars ------------------------------------------------------------------ | 458 // Infobars ------------------------------------------------------------------ |
459 | 459 |
460 // Adds an InfoBar for the specified |delegate|. | 460 // Adds an InfoBar for the specified |delegate|. |
461 virtual void AddInfoBar(InfoBarDelegate* delegate); | 461 virtual void AddInfoBar(InfoBarDelegate* delegate); |
Ben Goodger (Google)
2010/11/10 21:30:59
Can you add a note here about ownership/lifetime n
| |
462 | 462 |
463 // Removes the InfoBar for the specified |delegate|. | 463 // Removes the InfoBar for the specified |delegate|. |
464 void RemoveInfoBar(InfoBarDelegate* delegate); | 464 void RemoveInfoBar(InfoBarDelegate* delegate); |
465 | 465 |
466 // Replaces one infobar with another, without any animation in between. | 466 // Replaces one infobar with another, without any animation in between. |
467 void ReplaceInfoBar(InfoBarDelegate* old_delegate, | 467 void ReplaceInfoBar(InfoBarDelegate* old_delegate, |
468 InfoBarDelegate* new_delegate); | 468 InfoBarDelegate* new_delegate); |
469 | 469 |
470 // Enumeration and access functions. | 470 // Enumeration and access functions. |
471 int infobar_delegate_count() const { return infobar_delegates_.size(); } | 471 int infobar_delegate_count() const { return infobar_delegates_.size(); } |
472 InfoBarDelegate* GetInfoBarDelegateAt(int index) { | 472 InfoBarDelegate* GetInfoBarDelegateAt(int index) { |
473 return infobar_delegates_.at(index); | 473 return infobar_delegates_[index]; |
tfarina
2010/11/10 13:11:57
hum? Why? What is the benefit?
| |
474 } | 474 } |
475 | 475 |
476 // Toolbars and such --------------------------------------------------------- | 476 // Toolbars and such --------------------------------------------------------- |
477 | 477 |
478 // Returns true if a Bookmark Bar should be shown for this tab. | 478 // Returns true if a Bookmark Bar should be shown for this tab. |
479 virtual bool ShouldShowBookmarkBar(); | 479 virtual bool ShouldShowBookmarkBar(); |
480 | 480 |
481 // Notifies the delegate that a download is about to be started. | 481 // Notifies the delegate that a download is about to be started. |
482 // This notification is fired before a local temporary file has been created. | 482 // This notification is fired before a local temporary file has been created. |
483 bool CanDownload(int request_id); | 483 bool CanDownload(int request_id); |
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1184 | 1184 |
1185 // TODO(pkasting): Hack to try and fix Linux browser tests. | 1185 // TODO(pkasting): Hack to try and fix Linux browser tests. |
1186 bool dont_notify_render_view_; | 1186 bool dont_notify_render_view_; |
1187 | 1187 |
1188 // True if this is a secure page which displayed insecure content. | 1188 // True if this is a secure page which displayed insecure content. |
1189 bool displayed_insecure_content_; | 1189 bool displayed_insecure_content_; |
1190 | 1190 |
1191 // Data for shelves and stuff ------------------------------------------------ | 1191 // Data for shelves and stuff ------------------------------------------------ |
1192 | 1192 |
1193 // Delegates for InfoBars associated with this TabContents. | 1193 // Delegates for InfoBars associated with this TabContents. |
1194 std::vector<InfoBarDelegate*> infobar_delegates_; | 1194 typedef std::vector<InfoBarDelegate*> InfoBarDelegates; |
1195 InfoBarDelegates infobar_delegates_; | |
1195 | 1196 |
1196 // Data for find in page ----------------------------------------------------- | 1197 // Data for find in page ----------------------------------------------------- |
1197 | 1198 |
1198 // TODO(brettw) this should be separated into a helper class. | 1199 // TODO(brettw) this should be separated into a helper class. |
1199 | 1200 |
1200 // Each time a search request comes in we assign it an id before passing it | 1201 // Each time a search request comes in we assign it an id before passing it |
1201 // over the IPC so that when the results come in we can evaluate whether we | 1202 // over the IPC so that when the results come in we can evaluate whether we |
1202 // still care about the results of the search (in some cases we don't because | 1203 // still care about the results of the search (in some cases we don't because |
1203 // the user has issued a new search). | 1204 // the user has issued a new search). |
1204 static int find_request_id_counter_; | 1205 static int find_request_id_counter_; |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1315 // Content restrictions, used to disable print/copy etc based on content's | 1316 // Content restrictions, used to disable print/copy etc based on content's |
1316 // (full-page plugins for now only) permissions. | 1317 // (full-page plugins for now only) permissions. |
1317 int content_restrictions_; | 1318 int content_restrictions_; |
1318 | 1319 |
1319 // --------------------------------------------------------------------------- | 1320 // --------------------------------------------------------------------------- |
1320 | 1321 |
1321 DISALLOW_COPY_AND_ASSIGN(TabContents); | 1322 DISALLOW_COPY_AND_ASSIGN(TabContents); |
1322 }; | 1323 }; |
1323 | 1324 |
1324 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 1325 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
OLD | NEW |