| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <string> | 10 #include <string> |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 static void RegisterUserPrefs(PrefService* prefs); | 82 static void RegisterUserPrefs(PrefService* prefs); |
| 83 | 83 |
| 84 // Factory ------------------------------------------------------------------- | 84 // Factory ------------------------------------------------------------------- |
| 85 // (implemented in tab_contents_factory.cc) | 85 // (implemented in tab_contents_factory.cc) |
| 86 | 86 |
| 87 // Creates a new TabContents of the given type. Will reuse the given | 87 // Creates a new TabContents of the given type. Will reuse the given |
| 88 // instance's renderer, if it is not null. The given render view host factory | 88 // instance's renderer, if it is not null. The given render view host factory |
| 89 // will be passed to the new TabContents (it may be NULL). | 89 // will be passed to the new TabContents (it may be NULL). |
| 90 static TabContents* CreateWithType(TabContentsType type, | 90 static TabContents* CreateWithType(TabContentsType type, |
| 91 Profile* profile, | 91 Profile* profile, |
| 92 SiteInstance* instance, | 92 SiteInstance* instance); |
| 93 RenderViewHostFactory* rvh_factory); | |
| 94 | 93 |
| 95 // Returns the type of TabContents needed to handle the URL. |url| may | 94 // Returns the type of TabContents needed to handle the URL. |url| may |
| 96 // end up being modified to contain the _real_ url being loaded if the | 95 // end up being modified to contain the _real_ url being loaded if the |
| 97 // parameter was an alias (such as about: urls and chrome- urls). | 96 // parameter was an alias (such as about: urls and chrome- urls). |
| 98 static TabContentsType TypeForURL(GURL* url); | 97 static TabContentsType TypeForURL(GURL* url); |
| 99 | 98 |
| 100 // This method can be used to register a new TabContents type dynamically, | 99 // This method can be used to register a new TabContents type dynamically, |
| 101 // which can be very useful for unit testing. If factory is null, then the | 100 // which can be very useful for unit testing. If factory is null, then the |
| 102 // tab contents type is unregistered. Returns the previously registered | 101 // tab contents type is unregistered. Returns the previously registered |
| 103 // factory for the given type or null if there was none. | 102 // factory for the given type or null if there was none. |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 545 // Delegates for InfoBars associated with this TabContents. | 544 // Delegates for InfoBars associated with this TabContents. |
| 546 std::vector<InfoBarDelegate*> infobar_delegates_; | 545 std::vector<InfoBarDelegate*> infobar_delegates_; |
| 547 | 546 |
| 548 // See getter above. | 547 // See getter above. |
| 549 bool is_being_destroyed_; | 548 bool is_being_destroyed_; |
| 550 | 549 |
| 551 DISALLOW_COPY_AND_ASSIGN(TabContents); | 550 DISALLOW_COPY_AND_ASSIGN(TabContents); |
| 552 }; | 551 }; |
| 553 | 552 |
| 554 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 553 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
| OLD | NEW |