| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ | 5 #ifndef COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ |
| 6 #define COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ | 6 #define COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 | 154 |
| 155 void set_frozen(bool frozen) { frozen_ = frozen; } | 155 void set_frozen(bool frozen) { frozen_ = frozen; } |
| 156 bool is_empty() { return queue_.empty(); } | 156 bool is_empty() { return queue_.empty(); } |
| 157 WebTaskList* mutable_task_list() { return &task_list_; } | 157 WebTaskList* mutable_task_list() { return &task_list_; } |
| 158 | 158 |
| 159 private: | 159 private: |
| 160 void ProcessWork(); | 160 void ProcessWork(); |
| 161 | 161 |
| 162 class WorkQueueTask : public WebMethodTask<WorkQueue> { | 162 class WorkQueueTask : public WebMethodTask<WorkQueue> { |
| 163 public: | 163 public: |
| 164 WorkQueueTask(WorkQueue* object) : WebMethodTask<WorkQueue>(object) {} | 164 WorkQueueTask(WorkQueue* object); |
| 165 | 165 |
| 166 void RunIfValid() override; | 166 void RunIfValid() override; |
| 167 }; | 167 }; |
| 168 | 168 |
| 169 WebTaskList task_list_; | 169 WebTaskList task_list_; |
| 170 std::deque<WorkItem*> queue_; | 170 std::deque<WorkItem*> queue_; |
| 171 bool frozen_; | 171 bool frozen_; |
| 172 TestRunner* controller_; | 172 TestRunner* controller_; |
| 173 }; | 173 }; |
| 174 | 174 |
| (...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 835 bool use_mock_theme_; | 835 bool use_mock_theme_; |
| 836 | 836 |
| 837 base::WeakPtrFactory<TestRunner> weak_factory_; | 837 base::WeakPtrFactory<TestRunner> weak_factory_; |
| 838 | 838 |
| 839 DISALLOW_COPY_AND_ASSIGN(TestRunner); | 839 DISALLOW_COPY_AND_ASSIGN(TestRunner); |
| 840 }; | 840 }; |
| 841 | 841 |
| 842 } // namespace test_runner | 842 } // namespace test_runner |
| 843 | 843 |
| 844 #endif // COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ | 844 #endif // COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ |
| OLD | NEW |