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

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

Issue 2711703002: Revert of Use TaskScheduler instead of WorkerPool in v8_platform.cc. (Closed)
Patch Set: another patchset to kick off tryjobs 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"
13 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
14 #include "v8/include/v8.h" 13 #include "v8/include/v8.h"
15 14
16 namespace gin { 15 namespace gin {
17 class ContextHolder; 16 class ContextHolder;
18 class IsolateHolder; 17 class IsolateHolder;
19 } 18 }
20 19
21 namespace extensions { 20 namespace extensions {
22 21
(...skipping 14 matching lines...) Expand all
37 36
38 v8::Local<v8::Context> ContextLocal(); 37 v8::Local<v8::Context> ContextLocal();
39 void DisposeContext(); 38 void DisposeContext();
40 39
41 // Returns the associated isolate. Defined out-of-line to avoid the include 40 // Returns the associated isolate. Defined out-of-line to avoid the include
42 // for IsolateHolder in the header. 41 // for IsolateHolder in the header.
43 v8::Isolate* isolate(); 42 v8::Isolate* isolate();
44 43
45 private: 44 private:
46 base::MessageLoop message_loop_; 45 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
52 std::unique_ptr<gin::IsolateHolder> isolate_holder_; 46 std::unique_ptr<gin::IsolateHolder> isolate_holder_;
53 std::unique_ptr<gin::ContextHolder> context_holder_; 47 std::unique_ptr<gin::ContextHolder> context_holder_;
54 48
55 DISALLOW_COPY_AND_ASSIGN(APIBindingTest); 49 DISALLOW_COPY_AND_ASSIGN(APIBindingTest);
56 }; 50 };
57 51
58 } // namespace extensions 52 } // namespace extensions
59 53
60 #endif // EXTENSIONS_RENDERER_API_BINDING_TEST_H_ 54 #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