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/base/test_tab_strip_model_observer.h" | 5 #include "chrome/test/base/test_tab_strip_model_observer.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "chrome/browser/printing/print_preview_tab_controller.h" | 9 #include "chrome/browser/printing/print_preview_tab_controller.h" |
10 #include "chrome/browser/tabs/tab_strip_model.h" | 10 #include "chrome/browser/tabs/tab_strip_model.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 | 36 |
37 void TestTabStripModelObserver::ObservePrintPreviewTabContents( | 37 void TestTabStripModelObserver::ObservePrintPreviewTabContents( |
38 TabContentsWrapper* contents) { | 38 TabContentsWrapper* contents) { |
39 printing::PrintPreviewTabController* tab_controller = | 39 printing::PrintPreviewTabController* tab_controller = |
40 printing::PrintPreviewTabController::GetInstance(); | 40 printing::PrintPreviewTabController::GetInstance(); |
41 if (tab_controller) { | 41 if (tab_controller) { |
42 TabContentsWrapper* preview_tab = | 42 TabContentsWrapper* preview_tab = |
43 tab_controller->GetPrintPreviewForTab(contents); | 43 tab_controller->GetPrintPreviewForTab(contents); |
44 if (preview_tab) { | 44 if (preview_tab) { |
45 RegisterAsObserver(content::Source<NavigationController>( | 45 RegisterAsObserver(content::Source<NavigationController>( |
46 &preview_tab->tab_contents()->controller())); | 46 &preview_tab->tab_contents()->GetController())); |
47 } | 47 } |
48 } | 48 } |
49 } | 49 } |
OLD | NEW |