| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/tab_contents_wrapper.h" | 5 #include "chrome/browser/tab_contents_wrapper.h" |
| 6 | 6 |
| 7 #include "base/singleton.h" |
| 7 #include "chrome/browser/password_manager/password_manager.h" | 8 #include "chrome/browser/password_manager/password_manager.h" |
| 8 #include "chrome/browser/password_manager_delegate_impl.h" | 9 #include "chrome/browser/password_manager_delegate_impl.h" |
| 9 #include "chrome/browser/tab_contents/tab_contents.h" | 10 #include "chrome/browser/tab_contents/tab_contents.h" |
| 10 | 11 |
| 11 | 12 |
| 12 TabContentsWrapper::TabContentsWrapper(TabContents* contents) | 13 TabContentsWrapper::TabContentsWrapper(TabContents* contents) |
| 13 : tab_contents_(contents) { | 14 : tab_contents_(contents) { |
| 14 DCHECK(contents); | 15 DCHECK(contents); |
| 15 // Stash this in the property bag so it can be retrieved without having to | 16 // Stash this in the property bag so it can be retrieved without having to |
| 16 // go to a Browser. | 17 // go to a Browser. |
| (...skipping 23 matching lines...) Expand all Loading... |
| 40 } | 41 } |
| 41 | 42 |
| 42 TabContentsWrapper* TabContentsWrapper::Clone() { | 43 TabContentsWrapper* TabContentsWrapper::Clone() { |
| 43 TabContents* new_contents = tab_contents()->Clone(); | 44 TabContents* new_contents = tab_contents()->Clone(); |
| 44 TabContentsWrapper* new_wrapper = new TabContentsWrapper(new_contents); | 45 TabContentsWrapper* new_wrapper = new TabContentsWrapper(new_contents); |
| 45 // Instantiate the passowrd manager if it has been instantiated here. | 46 // Instantiate the passowrd manager if it has been instantiated here. |
| 46 if (password_manager_.get()) | 47 if (password_manager_.get()) |
| 47 new_wrapper->GetPasswordManager(); | 48 new_wrapper->GetPasswordManager(); |
| 48 return new_wrapper; | 49 return new_wrapper; |
| 49 } | 50 } |
| OLD | NEW |