| 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 #ifndef CHROME_TEST_TEST_TAB_STRIP_MODEL_OBSERVER_H_ | 5 #ifndef CHROME_TEST_TEST_TAB_STRIP_MODEL_OBSERVER_H_ |
| 6 #define CHROME_TEST_TEST_TAB_STRIP_MODEL_OBSERVER_H_ | 6 #define CHROME_TEST_TEST_TAB_STRIP_MODEL_OBSERVER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "chrome/browser/tabs/tab_strip_model_observer.h" | 10 #include "chrome/browser/tabs/tab_strip_model_observer.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 // Run the UI message loop until |done_| becomes true. | 41 // Run the UI message loop until |done_| becomes true. |
| 42 void WaitForObservation(); | 42 void WaitForObservation(); |
| 43 | 43 |
| 44 private: | 44 private: |
| 45 // TabStripModelObserver: | 45 // TabStripModelObserver: |
| 46 virtual void TabInsertedAt(TabContentsWrapper* contents, int index, | 46 virtual void TabInsertedAt(TabContentsWrapper* contents, int index, |
| 47 bool foreground) OVERRIDE; | 47 bool foreground) OVERRIDE; |
| 48 | 48 |
| 49 // NotificationObserver: | 49 // NotificationObserver: |
| 50 virtual void Observe(NotificationType type, const NotificationSource& source, | 50 virtual void Observe(int type, const NotificationSource& source, |
| 51 const NotificationDetails& details) OVERRIDE; | 51 const NotificationDetails& details) OVERRIDE; |
| 52 | 52 |
| 53 NotificationRegistrar registrar_; | 53 NotificationRegistrar registrar_; |
| 54 | 54 |
| 55 // If true the navigation has started. | 55 // If true the navigation has started. |
| 56 bool navigation_started_; | 56 bool navigation_started_; |
| 57 | 57 |
| 58 // The number of navigations that have been completed. | 58 // The number of navigations that have been completed. |
| 59 int navigations_completed_; | 59 int navigations_completed_; |
| 60 | 60 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 71 // |done_| will get set when this object observes a TabStripModel event. | 71 // |done_| will get set when this object observes a TabStripModel event. |
| 72 bool done_; | 72 bool done_; |
| 73 | 73 |
| 74 // |running_| will be true during WaitForObservation until |done_| is true. | 74 // |running_| will be true during WaitForObservation until |done_| is true. |
| 75 bool running_; | 75 bool running_; |
| 76 | 76 |
| 77 DISALLOW_COPY_AND_ASSIGN(TestTabStripModelObserver); | 77 DISALLOW_COPY_AND_ASSIGN(TestTabStripModelObserver); |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 #endif // CHROME_TEST_TEST_TAB_STRIP_MODEL_OBSERVER_H_ | 80 #endif // CHROME_TEST_TEST_TAB_STRIP_MODEL_OBSERVER_H_ |
| OLD | NEW |