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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 } | 309 } |
310 | 310 |
311 void TabContentsDelegate::WebIntentDispatch(TabContents* tab, | 311 void TabContentsDelegate::WebIntentDispatch(TabContents* tab, |
312 int routing_id, | 312 int routing_id, |
313 const string16& action, | 313 const string16& action, |
314 const string16& type, | 314 const string16& type, |
315 const string16& data, | 315 const string16& data, |
316 int intent_id) { | 316 int intent_id) { |
317 } | 317 } |
318 | 318 |
| 319 void TabContentsDelegate::UpdatePreferredSize(TabContents* source, |
| 320 const gfx::Size& pref_size) { |
| 321 } |
| 322 |
319 TabContentsDelegate::~TabContentsDelegate() { | 323 TabContentsDelegate::~TabContentsDelegate() { |
320 while (!attached_contents_.empty()) { | 324 while (!attached_contents_.empty()) { |
321 TabContents* tab_contents = *attached_contents_.begin(); | 325 TabContents* tab_contents = *attached_contents_.begin(); |
322 tab_contents->set_delegate(NULL); | 326 tab_contents->set_delegate(NULL); |
323 } | 327 } |
324 DCHECK(attached_contents_.empty()); | 328 DCHECK(attached_contents_.empty()); |
325 } | 329 } |
326 | 330 |
327 void TabContentsDelegate::Attach(TabContents* tab_contents) { | 331 void TabContentsDelegate::Attach(TabContents* tab_contents) { |
328 DCHECK(attached_contents_.find(tab_contents) == attached_contents_.end()); | 332 DCHECK(attached_contents_.find(tab_contents) == attached_contents_.end()); |
329 attached_contents_.insert(tab_contents); | 333 attached_contents_.insert(tab_contents); |
330 } | 334 } |
331 | 335 |
332 void TabContentsDelegate::Detach(TabContents* tab_contents) { | 336 void TabContentsDelegate::Detach(TabContents* tab_contents) { |
333 DCHECK(attached_contents_.find(tab_contents) != attached_contents_.end()); | 337 DCHECK(attached_contents_.find(tab_contents) != attached_contents_.end()); |
334 attached_contents_.erase(tab_contents); | 338 attached_contents_.erase(tab_contents); |
335 } | 339 } |
OLD | NEW |