| 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 "chrome/test/test_tab_strip_model_observer.h" | 5 #include "chrome/test/base/test_tab_strip_model_observer.h" |
| 6 | 6 |
| 7 #include "chrome/browser/tabs/tab_strip_model.h" | 7 #include "chrome/browser/tabs/tab_strip_model.h" |
| 8 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 8 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 9 | 9 |
| 10 TestTabStripModelObserver::TestTabStripModelObserver( | 10 TestTabStripModelObserver::TestTabStripModelObserver( |
| 11 TabStripModel* tab_strip_model, | 11 TabStripModel* tab_strip_model, |
| 12 TestTabStripModelObserver::JsInjectionReadyObserver* | 12 TestTabStripModelObserver::JsInjectionReadyObserver* |
| 13 js_injection_ready_observer) | 13 js_injection_ready_observer) |
| 14 : TestNavigationObserver(js_injection_ready_observer, 1), | 14 : TestNavigationObserver(js_injection_ready_observer, 1), |
| 15 tab_strip_model_(tab_strip_model) { | 15 tab_strip_model_(tab_strip_model) { |
| 16 tab_strip_model_->AddObserver(this); | 16 tab_strip_model_->AddObserver(this); |
| 17 } | 17 } |
| 18 | 18 |
| 19 TestTabStripModelObserver::~TestTabStripModelObserver() { | 19 TestTabStripModelObserver::~TestTabStripModelObserver() { |
| 20 tab_strip_model_->RemoveObserver(this); | 20 tab_strip_model_->RemoveObserver(this); |
| 21 } | 21 } |
| 22 | 22 |
| 23 void TestTabStripModelObserver::TabInsertedAt( | 23 void TestTabStripModelObserver::TabInsertedAt( |
| 24 TabContentsWrapper* contents, int index, bool foreground) { | 24 TabContentsWrapper* contents, int index, bool foreground) { |
| 25 RegisterAsObserver(&contents->controller()); | 25 RegisterAsObserver(&contents->controller()); |
| 26 } | 26 } |
| OLD | NEW |