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

Side by Side Diff: components/test_runner/test_runner_for_specific_view.cc

Issue 2357043003: Remove WebCallbackTask (Closed)
Patch Set: remove WebTaskRunner::postTask(base::Closure). git cl format Created 4 years, 3 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 | « components/test_runner/test_runner.cc ('k') | components/test_runner/web_task.h » ('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 #include "components/test_runner/test_runner_for_specific_view.h" 5 #include "components/test_runner/test_runner_for_specific_view.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <limits> 8 #include <limits>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 10 matching lines...) Expand all
21 #include "components/test_runner/mock_credential_manager_client.h" 21 #include "components/test_runner/mock_credential_manager_client.h"
22 #include "components/test_runner/mock_screen_orientation_client.h" 22 #include "components/test_runner/mock_screen_orientation_client.h"
23 #include "components/test_runner/mock_web_speech_recognizer.h" 23 #include "components/test_runner/mock_web_speech_recognizer.h"
24 #include "components/test_runner/mock_web_user_media_client.h" 24 #include "components/test_runner/mock_web_user_media_client.h"
25 #include "components/test_runner/pixel_dump.h" 25 #include "components/test_runner/pixel_dump.h"
26 #include "components/test_runner/spell_check_client.h" 26 #include "components/test_runner/spell_check_client.h"
27 #include "components/test_runner/test_common.h" 27 #include "components/test_runner/test_common.h"
28 #include "components/test_runner/test_interfaces.h" 28 #include "components/test_runner/test_interfaces.h"
29 #include "components/test_runner/test_preferences.h" 29 #include "components/test_runner/test_preferences.h"
30 #include "components/test_runner/test_runner.h" 30 #include "components/test_runner/test_runner.h"
31 #include "components/test_runner/web_task.h"
32 #include "components/test_runner/web_test_delegate.h" 31 #include "components/test_runner/web_test_delegate.h"
33 #include "components/test_runner/web_view_test_proxy.h" 32 #include "components/test_runner/web_view_test_proxy.h"
34 #include "gin/arguments.h" 33 #include "gin/arguments.h"
35 #include "gin/array_buffer.h" 34 #include "gin/array_buffer.h"
36 #include "gin/handle.h" 35 #include "gin/handle.h"
37 #include "gin/object_template_builder.h" 36 #include "gin/object_template_builder.h"
38 #include "gin/wrappable.h" 37 #include "gin/wrappable.h"
39 #include "third_party/WebKit/public/platform/WebCanvas.h" 38 #include "third_party/WebKit/public/platform/WebCanvas.h"
40 #include "third_party/WebKit/public/platform/WebData.h" 39 #include "third_party/WebKit/public/platform/WebData.h"
41 #include "third_party/WebKit/public/platform/WebPasswordCredential.h" 40 #include "third_party/WebKit/public/platform/WebPasswordCredential.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 PostDelayedTask( 136 PostDelayedTask(
138 0, base::Bind(&TestRunnerForSpecificView::DidLosePointerLockInternal, 137 0, base::Bind(&TestRunnerForSpecificView::DidLosePointerLockInternal,
139 weak_factory_.GetWeakPtr())); 138 weak_factory_.GetWeakPtr()));
140 } 139 }
141 140
142 bool TestRunnerForSpecificView::isPointerLocked() { 141 bool TestRunnerForSpecificView::isPointerLocked() {
143 return pointer_locked_; 142 return pointer_locked_;
144 } 143 }
145 144
146 void TestRunnerForSpecificView::PostTask(const base::Closure& callback) { 145 void TestRunnerForSpecificView::PostTask(const base::Closure& callback) {
147 delegate()->PostTask(new WebCallbackTask(callback)); 146 delegate()->PostTask(callback);
148 } 147 }
149 148
150 void TestRunnerForSpecificView::PostDelayedTask(long long delay, 149 void TestRunnerForSpecificView::PostDelayedTask(long long delay,
151 const base::Closure& callback) { 150 const base::Closure& callback) {
152 delegate()->PostDelayedTask(new WebCallbackTask(callback), delay); 151 delegate()->PostDelayedTask(callback, delay);
153 } 152 }
154 153
155 void TestRunnerForSpecificView::PostV8Callback( 154 void TestRunnerForSpecificView::PostV8Callback(
156 const v8::Local<v8::Function>& callback) { 155 const v8::Local<v8::Function>& callback) {
157 PostTask(base::Bind(&TestRunnerForSpecificView::InvokeV8Callback, 156 PostTask(base::Bind(&TestRunnerForSpecificView::InvokeV8Callback,
158 weak_factory_.GetWeakPtr(), 157 weak_factory_.GetWeakPtr(),
159 v8::UniquePersistent<v8::Function>( 158 v8::UniquePersistent<v8::Function>(
160 blink::mainThreadIsolate(), callback))); 159 blink::mainThreadIsolate(), callback)));
161 } 160 }
162 161
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 693
695 blink::WebView* TestRunnerForSpecificView::web_view() { 694 blink::WebView* TestRunnerForSpecificView::web_view() {
696 return web_view_test_proxy_base_->web_view(); 695 return web_view_test_proxy_base_->web_view();
697 } 696 }
698 697
699 WebTestDelegate* TestRunnerForSpecificView::delegate() { 698 WebTestDelegate* TestRunnerForSpecificView::delegate() {
700 return web_view_test_proxy_base_->delegate(); 699 return web_view_test_proxy_base_->delegate();
701 } 700 }
702 701
703 } // namespace test_runner 702 } // namespace test_runner
OLDNEW
« no previous file with comments | « components/test_runner/test_runner.cc ('k') | components/test_runner/web_task.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698