| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "extensions/browser/process_manager_observer.h" | 9 #include "extensions/browser/process_manager_observer.h" |
| 10 | 10 |
| 11 namespace extensions { | 11 namespace extensions { |
| 12 class Extension; | 12 class Extension; |
| 13 class ExtensionHost; | |
| 14 class ProcessManager; | 13 class ProcessManager; |
| 15 | 14 |
| 16 // Observes the background page load state of an extension. Use this in tests | 15 // Observes the background page load state of an extension. Use this in tests |
| 17 // which rely on a specific open or close state of a background page. | 16 // which rely on a specific open or close state of a background page. |
| 18 class BackgroundPageWatcher : public ProcessManagerObserver { | 17 class BackgroundPageWatcher : public ProcessManagerObserver { |
| 19 public: | 18 public: |
| 20 BackgroundPageWatcher(ProcessManager* process_manager, | 19 BackgroundPageWatcher(ProcessManager* process_manager, |
| 21 const Extension* extension); | 20 const Extension* extension); |
| 22 | 21 |
| 23 ~BackgroundPageWatcher(); | 22 ~BackgroundPageWatcher(); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 48 ProcessManager* process_manager_; | 47 ProcessManager* process_manager_; |
| 49 const std::string extension_id_; | 48 const std::string extension_id_; |
| 50 base::Closure quit_run_loop_; | 49 base::Closure quit_run_loop_; |
| 51 bool is_waiting_for_open_; | 50 bool is_waiting_for_open_; |
| 52 bool is_waiting_for_close_; | 51 bool is_waiting_for_close_; |
| 53 | 52 |
| 54 DISALLOW_COPY_AND_ASSIGN(BackgroundPageWatcher); | 53 DISALLOW_COPY_AND_ASSIGN(BackgroundPageWatcher); |
| 55 }; | 54 }; |
| 56 | 55 |
| 57 } // namespace extensions | 56 } // namespace extensions |
| OLD | NEW |