OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "mojo/services/html_viewer/blink_platform_impl.h" | 5 #include "mojo/services/html_viewer/blink_platform_impl.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 | 8 |
9 #include "base/rand_util.h" | 9 #include "base/rand_util.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 | 130 |
131 void BlinkPlatformImpl::stopSharedTimer() { | 131 void BlinkPlatformImpl::stopSharedTimer() { |
132 shared_timer_.Stop(); | 132 shared_timer_.Stop(); |
133 } | 133 } |
134 | 134 |
135 void BlinkPlatformImpl::callOnMainThread( | 135 void BlinkPlatformImpl::callOnMainThread( |
136 void (*func)(void*), void* context) { | 136 void (*func)(void*), void* context) { |
137 main_loop_->PostTask(FROM_HERE, base::Bind(func, context)); | 137 main_loop_->PostTask(FROM_HERE, base::Bind(func, context)); |
138 } | 138 } |
139 | 139 |
| 140 bool BlinkPlatformImpl::isThreadedCompositingEnabled() { |
| 141 return true; |
| 142 } |
| 143 |
| 144 blink::WebCompositorSupport* BlinkPlatformImpl::compositorSupport() { |
| 145 return &compositor_support_; |
| 146 } |
| 147 |
140 blink::WebScrollbarBehavior* BlinkPlatformImpl::scrollbarBehavior() { | 148 blink::WebScrollbarBehavior* BlinkPlatformImpl::scrollbarBehavior() { |
141 return &scrollbar_behavior_; | 149 return &scrollbar_behavior_; |
142 } | 150 } |
143 | 151 |
144 const unsigned char* BlinkPlatformImpl::getTraceCategoryEnabledFlag( | 152 const unsigned char* BlinkPlatformImpl::getTraceCategoryEnabledFlag( |
145 const char* category_name) { | 153 const char* category_name) { |
146 static const unsigned char buf[] = "*"; | 154 static const unsigned char buf[] = "*"; |
147 return buf; | 155 return buf; |
148 } | 156 } |
149 | 157 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 } | 228 } |
221 | 229 |
222 // static | 230 // static |
223 void BlinkPlatformImpl::DestroyCurrentThread(void* thread) { | 231 void BlinkPlatformImpl::DestroyCurrentThread(void* thread) { |
224 WebThreadImplForMessageLoop* impl = | 232 WebThreadImplForMessageLoop* impl = |
225 static_cast<WebThreadImplForMessageLoop*>(thread); | 233 static_cast<WebThreadImplForMessageLoop*>(thread); |
226 delete impl; | 234 delete impl; |
227 } | 235 } |
228 | 236 |
229 } // namespace mojo | 237 } // namespace mojo |
OLD | NEW |