| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <stddef.h> |
| 6 #include <stdint.h> |
| 7 |
| 5 #include "base/callback.h" | 8 #include "base/callback.h" |
| 6 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 7 #include "base/location.h" | 10 #include "base/location.h" |
| 8 #include "base/memory/discardable_memory.h" | 11 #include "base/memory/discardable_memory.h" |
| 9 #include "base/single_thread_task_runner.h" | 12 #include "base/single_thread_task_runner.h" |
| 10 #include "base/strings/string_number_conversions.h" | 13 #include "base/strings/string_number_conversions.h" |
| 11 #include "base/thread_task_runner_handle.h" | 14 #include "base/thread_task_runner_handle.h" |
| 12 #include "components/scheduler/renderer/renderer_scheduler.h" | 15 #include "components/scheduler/renderer/renderer_scheduler.h" |
| 13 #include "content/app/mojo/mojo_init.h" | 16 #include "content/app/mojo/mojo_init.h" |
| 14 #include "content/common/in_process_child_thread_params.h" | 17 #include "content/common/in_process_child_thread_params.h" |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 : message_loop_(message_loop) {} | 128 : message_loop_(message_loop) {} |
| 126 | 129 |
| 127 // IPC::MessageFilter overrides: | 130 // IPC::MessageFilter overrides: |
| 128 bool OnMessageReceived(const IPC::Message& message) override { | 131 bool OnMessageReceived(const IPC::Message& message) override { |
| 129 message_loop_->task_runner()->PostTask( | 132 message_loop_->task_runner()->PostTask( |
| 130 FROM_HERE, base::Bind(&QuitTask, message_loop_)); | 133 FROM_HERE, base::Bind(&QuitTask, message_loop_)); |
| 131 return true; | 134 return true; |
| 132 } | 135 } |
| 133 | 136 |
| 134 bool GetSupportedMessageClasses( | 137 bool GetSupportedMessageClasses( |
| 135 std::vector<uint32>* supported_message_classes) const override { | 138 std::vector<uint32_t>* supported_message_classes) const override { |
| 136 supported_message_classes->push_back(TestMsgStart); | 139 supported_message_classes->push_back(TestMsgStart); |
| 137 return true; | 140 return true; |
| 138 } | 141 } |
| 139 | 142 |
| 140 private: | 143 private: |
| 141 ~QuitOnTestMsgFilter() override {} | 144 ~QuitOnTestMsgFilter() override {} |
| 142 | 145 |
| 143 base::MessageLoop* message_loop_; | 146 base::MessageLoop* message_loop_; |
| 144 }; | 147 }; |
| 145 | 148 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 test_helper_->Sender()->Send(new WebSocketMsg_NotifyFailure(1, "")); | 235 test_helper_->Sender()->Send(new WebSocketMsg_NotifyFailure(1, "")); |
| 233 test_helper_->Sender()->Send(new TestMsg_QuitRunLoop()); | 236 test_helper_->Sender()->Send(new TestMsg_QuitRunLoop()); |
| 234 | 237 |
| 235 test_helper_->GetMessageLoop()->Run(); | 238 test_helper_->GetMessageLoop()->Run(); |
| 236 | 239 |
| 237 EXPECT_EQ(0, test_task_counter_->NumTasksPosted()); | 240 EXPECT_EQ(0, test_task_counter_->NumTasksPosted()); |
| 238 } | 241 } |
| 239 | 242 |
| 240 } // namespace | 243 } // namespace |
| 241 } // namespace content | 244 } // namespace content |
| OLD | NEW |