| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_H_ | 5 #ifndef CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_H_ |
| 6 #define CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_H_ | 6 #define CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 class TabContentsWrapper : public TabContentsObserver, | 83 class TabContentsWrapper : public TabContentsObserver, |
| 84 public content::NotificationObserver { | 84 public content::NotificationObserver { |
| 85 public: | 85 public: |
| 86 // Takes ownership of |contents|, which must be heap-allocated (as it lives | 86 // Takes ownership of |contents|, which must be heap-allocated (as it lives |
| 87 // in a scoped_ptr) and can not be NULL. | 87 // in a scoped_ptr) and can not be NULL. |
| 88 explicit TabContentsWrapper(TabContents* contents); | 88 explicit TabContentsWrapper(TabContents* contents); |
| 89 virtual ~TabContentsWrapper(); | 89 virtual ~TabContentsWrapper(); |
| 90 | 90 |
| 91 // Used to retrieve this object from |tab_contents_|, which is placed in | 91 // Used to retrieve this object from |tab_contents_|, which is placed in |
| 92 // its property bag to avoid adding additional interfaces. | 92 // its property bag to avoid adding additional interfaces. |
| 93 static PropertyAccessor<TabContentsWrapper*>* property_accessor(); | 93 static base::PropertyAccessor<TabContentsWrapper*>* property_accessor(); |
| 94 | 94 |
| 95 static void RegisterUserPrefs(PrefService* prefs); | 95 static void RegisterUserPrefs(PrefService* prefs); |
| 96 | 96 |
| 97 // Initial title assigned to NavigationEntries from Navigate. | 97 // Initial title assigned to NavigationEntries from Navigate. |
| 98 static string16 GetDefaultTitle(); | 98 static string16 GetDefaultTitle(); |
| 99 | 99 |
| 100 // Returns a human-readable description the tab's loading state. | 100 // Returns a human-readable description the tab's loading state. |
| 101 string16 GetStatusText() const; | 101 string16 GetStatusText() const; |
| 102 | 102 |
| 103 // Create a TabContentsWrapper with the same state as this one. The returned | 103 // Create a TabContentsWrapper with the same state as this one. The returned |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 | 336 |
| 337 // The supporting objects need to outlive the TabContents dtor (as they may | 337 // The supporting objects need to outlive the TabContents dtor (as they may |
| 338 // be called upon during its execution). As a result, this must come last | 338 // be called upon during its execution). As a result, this must come last |
| 339 // in the list. | 339 // in the list. |
| 340 scoped_ptr<TabContents> tab_contents_; | 340 scoped_ptr<TabContents> tab_contents_; |
| 341 | 341 |
| 342 DISALLOW_COPY_AND_ASSIGN(TabContentsWrapper); | 342 DISALLOW_COPY_AND_ASSIGN(TabContentsWrapper); |
| 343 }; | 343 }; |
| 344 | 344 |
| 345 #endif // CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_H_ | 345 #endif // CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_H_ |
| OLD | NEW |