| Index: content/browser/tab_contents/tab_contents.cc
|
| diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc
|
| index cc805054f208b971cb56e8f7554f03984c3bdc26..43a46f78fde0f7999694d8b0f522dd349e986aed 100644
|
| --- a/content/browser/tab_contents/tab_contents.cc
|
| +++ b/content/browser/tab_contents/tab_contents.cc
|
| @@ -623,6 +623,19 @@ void TabContents::AddNewContents(TabContents* new_contents,
|
| user_gesture);
|
| }
|
|
|
| +void TabContents::set_delegate(TabContentsDelegate* delegate) {
|
| + if (delegate == delegate_)
|
| + return;
|
| +
|
| + if (delegate_)
|
| + delegate_->Detach(this);
|
| +
|
| + delegate_ = delegate;
|
| +
|
| + if (delegate_)
|
| + delegate_->Attach(this);
|
| +}
|
| +
|
| gfx::NativeView TabContents::GetContentNativeView() const {
|
| return view_->GetContentNativeView();
|
| }
|
|
|