| 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_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ | 5 #ifndef CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ |
| 6 #define CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ | 6 #define CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 public: | 310 public: |
| 311 TabCountChangeObserver(AutomationProvider* automation, | 311 TabCountChangeObserver(AutomationProvider* automation, |
| 312 Browser* browser, | 312 Browser* browser, |
| 313 IPC::Message* reply_message, | 313 IPC::Message* reply_message, |
| 314 int target_tab_count); | 314 int target_tab_count); |
| 315 // Implementation of TabStripModelObserver. | 315 // Implementation of TabStripModelObserver. |
| 316 virtual void TabInsertedAt(content::WebContents* contents, | 316 virtual void TabInsertedAt(content::WebContents* contents, |
| 317 int index, | 317 int index, |
| 318 bool foreground) OVERRIDE; | 318 bool foreground) OVERRIDE; |
| 319 virtual void TabDetachedAt(content::WebContents* contents, | 319 virtual void TabDetachedAt(content::WebContents* contents, |
| 320 int index) OVERRIDE; | 320 int index, |
| 321 bool closing_all) OVERRIDE; |
| 321 virtual void TabStripModelDeleted() OVERRIDE; | 322 virtual void TabStripModelDeleted() OVERRIDE; |
| 322 | 323 |
| 323 private: | 324 private: |
| 324 virtual ~TabCountChangeObserver(); | 325 virtual ~TabCountChangeObserver(); |
| 325 | 326 |
| 326 // Checks if the current tab count matches our target, and if so, | 327 // Checks if the current tab count matches our target, and if so, |
| 327 // sends the reply message and deletes self. | 328 // sends the reply message and deletes self. |
| 328 void CheckTabCount(); | 329 void CheckTabCount(); |
| 329 | 330 |
| 330 base::WeakPtr<AutomationProvider> automation_; | 331 base::WeakPtr<AutomationProvider> automation_; |
| (...skipping 1344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1675 base::WeakPtr<AutomationProvider> automation_; | 1676 base::WeakPtr<AutomationProvider> automation_; |
| 1676 scoped_ptr<IPC::Message> reply_message_; | 1677 scoped_ptr<IPC::Message> reply_message_; |
| 1677 int new_window_id_; | 1678 int new_window_id_; |
| 1678 int num_loads_; | 1679 int num_loads_; |
| 1679 | 1680 |
| 1680 DISALLOW_COPY_AND_ASSIGN( | 1681 DISALLOW_COPY_AND_ASSIGN( |
| 1681 BrowserOpenedWithExistingProfileNotificationObserver); | 1682 BrowserOpenedWithExistingProfileNotificationObserver); |
| 1682 }; | 1683 }; |
| 1683 | 1684 |
| 1684 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ | 1685 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ |
| OLD | NEW |