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