Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Side by Side Diff: chrome/test/base/test_tab_strip_model_observer.cc

Issue 8586009: Allow WebUI Tests to use preLoad in HtmlDialogUI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert to patch set 4. Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "chrome/browser/printing/print_preview_tab_controller.h" 8 #include "chrome/browser/printing/print_preview_tab_controller.h"
9 #include "chrome/browser/tabs/tab_strip_model.h" 9 #include "chrome/browser/tabs/tab_strip_model.h"
10 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 10 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
11 #include "content/public/browser/notification_source.h" 11 #include "content/public/browser/notification_source.h"
12 12
13 TestTabStripModelObserver::TestTabStripModelObserver( 13 TestTabStripModelObserver::TestTabStripModelObserver(
14 TabStripModel* tab_strip_model, 14 TabStripModel* tab_strip_model,
15 TestTabStripModelObserver::JsInjectionReadyObserver* 15 JsInjectionReadyObserver* js_injection_ready_observer)
16 js_injection_ready_observer)
17 : TestNavigationObserver(js_injection_ready_observer, 1), 16 : TestNavigationObserver(js_injection_ready_observer, 1),
18 tab_strip_model_(tab_strip_model) { 17 tab_strip_model_(tab_strip_model) {
19 tab_strip_model_->AddObserver(this); 18 tab_strip_model_->AddObserver(this);
20 } 19 }
21 20
22 TestTabStripModelObserver::~TestTabStripModelObserver() { 21 TestTabStripModelObserver::~TestTabStripModelObserver() {
23 tab_strip_model_->RemoveObserver(this); 22 tab_strip_model_->RemoveObserver(this);
24 } 23 }
25 24
26 void TestTabStripModelObserver::TabBlockedStateChanged( 25 void TestTabStripModelObserver::TabBlockedStateChanged(
(...skipping 12 matching lines...) Expand all
39 printing::PrintPreviewTabController::GetInstance(); 38 printing::PrintPreviewTabController::GetInstance();
40 if (tab_controller) { 39 if (tab_controller) {
41 TabContentsWrapper* preview_tab = 40 TabContentsWrapper* preview_tab =
42 tab_controller->GetPrintPreviewForTab(contents); 41 tab_controller->GetPrintPreviewForTab(contents);
43 if (preview_tab) { 42 if (preview_tab) {
44 RegisterAsObserver( 43 RegisterAsObserver(
45 content::Source<NavigationController>(&preview_tab->controller())); 44 content::Source<NavigationController>(&preview_tab->controller()));
46 } 45 }
47 } 46 }
48 } 47 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698