Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_H_ | 5 #ifndef CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_H_ |
| 6 #define CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_H_ | 6 #define CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 101 // heap-allocated pointer is owned by the caller. | 101 // heap-allocated pointer is owned by the caller. |
| 102 TabContents* Clone(); | 102 TabContents* Clone(); |
| 103 | 103 |
| 104 // Helper to retrieve the existing instance that owns a given WebContents. | 104 // Helper to retrieve the existing instance that owns a given WebContents. |
| 105 // Returns NULL if there is no such existing instance. | 105 // Returns NULL if there is no such existing instance. |
| 106 // NOTE: This is not intended for general use. It is intended for situations | 106 // NOTE: This is not intended for general use. It is intended for situations |
| 107 // like callbacks from content/ where only a WebContents is available. In the | 107 // like callbacks from content/ where only a WebContents is available. In the |
| 108 // general case, please do NOT use this; plumb TabContents through the chrome/ | 108 // general case, please do NOT use this; plumb TabContents through the chrome/ |
| 109 // code instead of WebContents. | 109 // code instead of WebContents. |
| 110 static TabContents* GetCurrentWrapperForContents( | 110 static TabContents* GetCurrentWrapperForContents( |
| 111 content::WebContents* contents); // DEPRECATED | |
| 112 static const TabContents* GetCurrentWrapperForContents( | |
| 113 const content::WebContents* contents); // DEPRECATED | |
| 114 static TabContents* GetOwningContentsForWebContents( | |
| 111 content::WebContents* contents); | 115 content::WebContents* contents); |
| 112 static const TabContents* GetCurrentWrapperForContents( | 116 static const TabContents* GetOwningContentsForWebContents( |
|
jam
2012/06/05 23:55:42
nit: GetOwningTabContentsForWebContents?
Avi (use Gerrit)
2012/06/06 14:13:55
Yeah, once you get past twenty characters, I guess
| |
| 113 const content::WebContents* contents); | 117 const content::WebContents* contents); |
| 114 | 118 |
| 115 // Returns the WebContents that this owns. | 119 // Returns the WebContents that this owns. |
| 116 content::WebContents* web_contents() const; | 120 content::WebContents* web_contents() const; |
| 117 | 121 |
| 118 // Returns the Profile that is associated with this TabContents. | 122 // Returns the Profile that is associated with this TabContents. |
| 119 Profile* profile() const; | 123 Profile* profile() const; |
| 120 | 124 |
| 121 // True if this TabContents is being torn down. | 125 // True if this TabContents is being torn down. |
| 122 bool in_destructor() const { return in_destructor_; } | 126 bool in_destructor() const { return in_destructor_; } |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 309 | 313 |
| 310 // The supporting objects need to outlive the WebContents dtor (as they may | 314 // The supporting objects need to outlive the WebContents dtor (as they may |
| 311 // be called upon during its execution). As a result, this must come last | 315 // be called upon during its execution). As a result, this must come last |
| 312 // in the list. | 316 // in the list. |
| 313 scoped_ptr<content::WebContents> web_contents_; | 317 scoped_ptr<content::WebContents> web_contents_; |
| 314 | 318 |
| 315 DISALLOW_COPY_AND_ASSIGN(TabContents); | 319 DISALLOW_COPY_AND_ASSIGN(TabContents); |
| 316 }; | 320 }; |
| 317 | 321 |
| 318 #endif // CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_H_ | 322 #endif // CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_H_ |
| OLD | NEW |