OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_TEST_BASE_TEST_TAB_STRIP_MODEL_OBSERVER_H_ | 5 #ifndef CHROME_TEST_BASE_TEST_TAB_STRIP_MODEL_OBSERVER_H_ |
6 #define CHROME_TEST_BASE_TEST_TAB_STRIP_MODEL_OBSERVER_H_ | 6 #define CHROME_TEST_BASE_TEST_TAB_STRIP_MODEL_OBSERVER_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" | 9 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" |
10 #include "content/public/test/test_navigation_observer.h" | 10 #include "content/public/test/test_navigation_observer.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 public: | 23 public: |
24 // Observe the |tab_strip_model|, which may not be NULL. If | 24 // Observe the |tab_strip_model|, which may not be NULL. If |
25 // |load_start_observer| is non-NULL, notify when the page load starts. | 25 // |load_start_observer| is non-NULL, notify when the page load starts. |
26 TestTabStripModelObserver( | 26 TestTabStripModelObserver( |
27 TabStripModel* tab_strip_model, | 27 TabStripModel* tab_strip_model, |
28 content::JsInjectionReadyObserver* js_injection_ready_observer); | 28 content::JsInjectionReadyObserver* js_injection_ready_observer); |
29 virtual ~TestTabStripModelObserver(); | 29 virtual ~TestTabStripModelObserver(); |
30 | 30 |
31 private: | 31 private: |
32 // Callback to observer the print preview dialog associated with |contents|. | 32 // Callback to observer the print preview dialog associated with |contents|. |
33 void ObservePrintPreviewTabContents(content::WebContents* contents); | 33 void ObservePrintPreviewDialog(content::WebContents* contents); |
34 | 34 |
35 // TabStripModelObserver: | 35 // TabStripModelObserver: |
36 virtual void TabBlockedStateChanged(content::WebContents* contents, | 36 virtual void TabBlockedStateChanged(content::WebContents* contents, |
37 int index) OVERRIDE; | 37 int index) OVERRIDE; |
38 | 38 |
39 // |tab_strip_model_| is the object this observes. The constructor will | 39 // |tab_strip_model_| is the object this observes. The constructor will |
40 // register this as an observer, and the destructor will remove the observer. | 40 // register this as an observer, and the destructor will remove the observer. |
41 TabStripModel* tab_strip_model_; | 41 TabStripModel* tab_strip_model_; |
42 | 42 |
43 DISALLOW_COPY_AND_ASSIGN(TestTabStripModelObserver); | 43 DISALLOW_COPY_AND_ASSIGN(TestTabStripModelObserver); |
44 }; | 44 }; |
45 | 45 |
46 #endif // CHROME_TEST_BASE_TEST_TAB_STRIP_MODEL_OBSERVER_H_ | 46 #endif // CHROME_TEST_BASE_TEST_TAB_STRIP_MODEL_OBSERVER_H_ |
OLD | NEW |