Chromium Code Reviews| 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 #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/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
| 10 #include "content/browser/javascript_dialogs.h" | 10 #include "content/browser/javascript_dialogs.h" |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 273 } | 273 } |
| 274 private: | 274 private: |
| 275 friend struct DefaultSingletonTraits<JavaScriptDialogCreatorStub>; | 275 friend struct DefaultSingletonTraits<JavaScriptDialogCreatorStub>; |
| 276 }; | 276 }; |
| 277 | 277 |
| 278 content::JavaScriptDialogCreator* | 278 content::JavaScriptDialogCreator* |
| 279 TabContentsDelegate::GetJavaScriptDialogCreator() { | 279 TabContentsDelegate::GetJavaScriptDialogCreator() { |
| 280 return JavaScriptDialogCreatorStub::GetInstance(); | 280 return JavaScriptDialogCreatorStub::GetInstance(); |
| 281 } | 281 } |
| 282 | 282 |
| 283 void TabContentsDelegate::ToggleFullscreenModeForTab(TabContents* tab, | |
| 284 bool enter_fullscreen) { | |
|
brettw
2011/08/24 00:28:31
Align to TabContents.
koz (OOO until 15th September)
2011/08/24 00:36:08
Done.
| |
| 285 } | |
| 286 | |
| 283 TabContentsDelegate::~TabContentsDelegate() { | 287 TabContentsDelegate::~TabContentsDelegate() { |
| 284 while (!attached_contents_.empty()) { | 288 while (!attached_contents_.empty()) { |
| 285 TabContents* tab_contents = *attached_contents_.begin(); | 289 TabContents* tab_contents = *attached_contents_.begin(); |
| 286 tab_contents->set_delegate(NULL); | 290 tab_contents->set_delegate(NULL); |
| 287 } | 291 } |
| 288 DCHECK(attached_contents_.empty()); | 292 DCHECK(attached_contents_.empty()); |
| 289 } | 293 } |
| 290 | 294 |
| 291 void TabContentsDelegate::Attach(TabContents* tab_contents) { | 295 void TabContentsDelegate::Attach(TabContents* tab_contents) { |
| 292 DCHECK(attached_contents_.find(tab_contents) == attached_contents_.end()); | 296 DCHECK(attached_contents_.find(tab_contents) == attached_contents_.end()); |
| 293 attached_contents_.insert(tab_contents); | 297 attached_contents_.insert(tab_contents); |
| 294 } | 298 } |
| 295 | 299 |
| 296 void TabContentsDelegate::Detach(TabContents* tab_contents) { | 300 void TabContentsDelegate::Detach(TabContents* tab_contents) { |
| 297 DCHECK(attached_contents_.find(tab_contents) != attached_contents_.end()); | 301 DCHECK(attached_contents_.find(tab_contents) != attached_contents_.end()); |
| 298 attached_contents_.erase(tab_contents); | 302 attached_contents_.erase(tab_contents); |
| 299 } | 303 } |
| OLD | NEW |