Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(342)

Side by Side Diff: extensions/renderer/api_binding_test.h

Issue 2610473002: Use TaskScheduler instead of WorkerPool in v8_platform.cc. (Closed)
Patch Set: rebase Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/test/blink_test_environment.cc ('k') | extensions/renderer/gc_callback_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 EXTENSIONS_RENDERER_API_BINDING_TEST_H_ 5 #ifndef EXTENSIONS_RENDERER_API_BINDING_TEST_H_
6 #define EXTENSIONS_RENDERER_API_BINDING_TEST_H_ 6 #define EXTENSIONS_RENDERER_API_BINDING_TEST_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/message_loop/message_loop.h" 11 #include "base/message_loop/message_loop.h"
12 #include "base/test/scoped_async_task_scheduler.h"
12 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
13 #include "v8/include/v8.h" 14 #include "v8/include/v8.h"
14 15
15 namespace gin { 16 namespace gin {
16 class ContextHolder; 17 class ContextHolder;
17 class IsolateHolder; 18 class IsolateHolder;
18 } 19 }
19 20
20 namespace extensions { 21 namespace extensions {
21 22
(...skipping 14 matching lines...) Expand all
36 37
37 v8::Local<v8::Context> ContextLocal(); 38 v8::Local<v8::Context> ContextLocal();
38 void DisposeContext(); 39 void DisposeContext();
39 40
40 // Returns the associated isolate. Defined out-of-line to avoid the include 41 // Returns the associated isolate. Defined out-of-line to avoid the include
41 // for IsolateHolder in the header. 42 // for IsolateHolder in the header.
42 v8::Isolate* isolate(); 43 v8::Isolate* isolate();
43 44
44 private: 45 private:
45 base::MessageLoop message_loop_; 46 base::MessageLoop message_loop_;
47
48 // Required by gin::V8Platform::CallOnBackgroundThread(). Can't be a
49 // ScopedTaskScheduler because v8 synchronously waits for tasks to run.
50 base::test::ScopedAsyncTaskScheduler scoped_async_task_scheduler_;
51
46 std::unique_ptr<gin::IsolateHolder> isolate_holder_; 52 std::unique_ptr<gin::IsolateHolder> isolate_holder_;
47 std::unique_ptr<gin::ContextHolder> context_holder_; 53 std::unique_ptr<gin::ContextHolder> context_holder_;
48 54
49 DISALLOW_COPY_AND_ASSIGN(APIBindingTest); 55 DISALLOW_COPY_AND_ASSIGN(APIBindingTest);
50 }; 56 };
51 57
52 } // namespace extensions 58 } // namespace extensions
53 59
54 #endif // EXTENSIONS_RENDERER_API_BINDING_TEST_H_ 60 #endif // EXTENSIONS_RENDERER_API_BINDING_TEST_H_
OLDNEW
« no previous file with comments | « content/test/blink_test_environment.cc ('k') | extensions/renderer/gc_callback_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698