Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(596)

Side by Side Diff: chrome/browser/ui/tab_contents/tab_contents.h

Issue 11418043: Remove TabContents from OmniboxEditController and friends. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cros Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 // True if this TabContents is being torn down. 99 // True if this TabContents is being torn down.
100 bool in_destructor() const { return in_destructor_; } 100 bool in_destructor() const { return in_destructor_; }
101 101
102 // Overrides ----------------------------------------------------------------- 102 // Overrides -----------------------------------------------------------------
103 103
104 // content::WebContentsObserver overrides: 104 // content::WebContentsObserver overrides:
105 virtual void WebContentsDestroyed(content::WebContents* tab) OVERRIDE; 105 virtual void WebContentsDestroyed(content::WebContents* tab) OVERRIDE;
106 106
107 private: 107 private:
108 friend class TabContentsFactory;
109
110 // Takes ownership of |contents|, which must be heap-allocated (as it lives 108 // Takes ownership of |contents|, which must be heap-allocated (as it lives
111 // in a scoped_ptr) and can not be NULL. 109 // in a scoped_ptr) and can not be NULL.
112 explicit TabContents(content::WebContents* contents); 110 explicit TabContents(content::WebContents* contents);
113 111
114 // Create a TabContents with the same state as this one. The returned 112 // Create a TabContents with the same state as this one. The returned
115 // heap-allocated pointer is owned by the caller. 113 // heap-allocated pointer is owned by the caller.
116 TabContents* Clone(); 114 TabContents* Clone();
117 115
118 // WebContents (MUST BE LAST) ------------------------------------------------ 116 // WebContents (MUST BE LAST) ------------------------------------------------
119 117
120 // If true, we're running the destructor. 118 // If true, we're running the destructor.
121 bool in_destructor_; 119 bool in_destructor_;
122 120
123 // The supporting objects need to outlive the WebContents dtor (as they may 121 // The supporting objects need to outlive the WebContents dtor (as they may
124 // be called upon during its execution). As a result, this must come last 122 // be called upon during its execution). As a result, this must come last
125 // in the list. 123 // in the list.
126 scoped_ptr<content::WebContents> web_contents_; 124 scoped_ptr<content::WebContents> web_contents_;
127 125
128 DISALLOW_COPY_AND_ASSIGN(TabContents); 126 DISALLOW_COPY_AND_ASSIGN(TabContents);
129 }; 127 };
130 128
131 #endif // CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_H_ 129 #endif // CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_edit_unittest.cc ('k') | chrome/browser/ui/views/location_bar/content_setting_image_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698