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

Side by Side Diff: content/browser/tab_contents/tab_contents_delegate.cc

Issue 7244009: Helper functions for tracking stale TabContentsDelegate's. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 months 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
« no previous file with comments | « content/browser/tab_contents/tab_contents_delegate.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "content/browser/tab_contents/tab_contents_delegate.h" 5 #include "content/browser/tab_contents/tab_contents_delegate.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "content/browser/javascript_dialogs.h" 9 #include "content/browser/javascript_dialogs.h"
10 #include "content/common/url_constants.h" 10 #include "content/common/url_constants.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 } 230 }
231 private: 231 private:
232 friend struct DefaultSingletonTraits<JavaScriptDialogCreatorStub>; 232 friend struct DefaultSingletonTraits<JavaScriptDialogCreatorStub>;
233 }; 233 };
234 234
235 content::JavaScriptDialogCreator* 235 content::JavaScriptDialogCreator*
236 TabContentsDelegate::GetJavaScriptDialogCreator() { 236 TabContentsDelegate::GetJavaScriptDialogCreator() {
237 return JavaScriptDialogCreatorStub::GetInstance(); 237 return JavaScriptDialogCreatorStub::GetInstance();
238 } 238 }
239 239
240 void TabContentsDelegate::Attach(TabContents* tab_contents) {
sky 2011/06/23 18:27:32 Position should match header.
cbentzel 2011/06/23 18:38:13 Done.
241 CHECK(attached_contents_.find(tab_contents) == attached_contents_.end());
242 attached_contents_.insert(tab_contents);
243 }
244
245 void TabContentsDelegate::Detach(TabContents* tab_contents) {
246 CHECK(attached_contents_.find(tab_contents) != attached_contents_.end());
247 attached_contents_.erase(tab_contents);
248 }
249
240 TabContentsDelegate::~TabContentsDelegate() { 250 TabContentsDelegate::~TabContentsDelegate() {
251 CHECK(attached_contents_.empty());
241 } 252 }
OLDNEW
« no previous file with comments | « content/browser/tab_contents/tab_contents_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698