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

Side by Side Diff: third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp

Issue 2580263002: Remove TaskType::Unspecified (14) (Closed)
Patch Set: rebase Created 3 years, 11 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
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 "core/dom/TaskRunnerHelper.h" 5 #include "core/dom/TaskRunnerHelper.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/frame/LocalFrame.h" 8 #include "core/frame/LocalFrame.h"
9 #include "platform/WebFrameScheduler.h" 9 #include "platform/WebFrameScheduler.h"
10 #include "platform/WebTaskRunner.h" 10 #include "platform/WebTaskRunner.h"
(...skipping 15 matching lines...) Expand all
26 case TaskType::WebSocket: 26 case TaskType::WebSocket:
27 case TaskType::Microtask: 27 case TaskType::Microtask:
28 case TaskType::PostedMessage: 28 case TaskType::PostedMessage:
29 case TaskType::UnshippedPortMessage: 29 case TaskType::UnshippedPortMessage:
30 case TaskType::FileReading: 30 case TaskType::FileReading:
31 case TaskType::DatabaseAccess: 31 case TaskType::DatabaseAccess:
32 case TaskType::Presentation: 32 case TaskType::Presentation:
33 case TaskType::Sensor: 33 case TaskType::Sensor:
34 case TaskType::Timer: 34 case TaskType::Timer:
35 case TaskType::UnspecedTimer: 35 case TaskType::UnspecedTimer:
36 case TaskType::Unspecified:
37 case TaskType::MiscPlatformAPI: 36 case TaskType::MiscPlatformAPI:
38 return frame ? frame->frameScheduler()->timerTaskRunner() 37 return frame ? frame->frameScheduler()->timerTaskRunner()
39 : Platform::current()->currentThread()->getWebTaskRunner(); 38 : Platform::current()->currentThread()->getWebTaskRunner();
40 case TaskType::UnspecedLoading: 39 case TaskType::UnspecedLoading:
41 case TaskType::Networking: 40 case TaskType::Networking:
42 return frame ? frame->frameScheduler()->loadingTaskRunner() 41 return frame ? frame->frameScheduler()->loadingTaskRunner()
43 : Platform::current()->currentThread()->getWebTaskRunner(); 42 : Platform::current()->currentThread()->getWebTaskRunner();
44 case TaskType::Unthrottled: 43 case TaskType::Unthrottled:
45 return frame ? frame->frameScheduler()->unthrottledTaskRunner() 44 return frame ? frame->frameScheduler()->unthrottledTaskRunner()
46 : Platform::current()->currentThread()->getWebTaskRunner(); 45 : Platform::current()->currentThread()->getWebTaskRunner();
(...skipping 11 matching lines...) Expand all
58 return get(type, executionContext && executionContext->isDocument() 57 return get(type, executionContext && executionContext->isDocument()
59 ? static_cast<Document*>(executionContext) 58 ? static_cast<Document*>(executionContext)
60 : nullptr); 59 : nullptr);
61 } 60 }
62 61
63 WebTaskRunner* TaskRunnerHelper::get(TaskType type, ScriptState* scriptState) { 62 WebTaskRunner* TaskRunnerHelper::get(TaskType type, ScriptState* scriptState) {
64 return get(type, scriptState ? scriptState->getExecutionContext() : nullptr); 63 return get(type, scriptState ? scriptState->getExecutionContext() : nullptr);
65 } 64 }
66 65
67 } // namespace blink 66 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/TaskRunnerHelper.h ('k') | third_party/WebKit/Source/core/workers/WorkerGlobalScope.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698