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 | |
148 blink::WebScrollbarBehavior* BlinkPlatformImpl::scrollbarBehavior() { | 140 blink::WebScrollbarBehavior* BlinkPlatformImpl::scrollbarBehavior() { |
149 return &scrollbar_behavior_; | 141 return &scrollbar_behavior_; |
150 } | 142 } |
151 | 143 |
152 const unsigned char* BlinkPlatformImpl::getTraceCategoryEnabledFlag( | 144 const unsigned char* BlinkPlatformImpl::getTraceCategoryEnabledFlag( |
153 const char* category_name) { | 145 const char* category_name) { |
154 static const unsigned char buf[] = "*"; | 146 static const unsigned char buf[] = "*"; |
155 return buf; | 147 return buf; |
156 } | 148 } |
157 | 149 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 } | 220 } |
229 | 221 |
230 // static | 222 // static |
231 void BlinkPlatformImpl::DestroyCurrentThread(void* thread) { | 223 void BlinkPlatformImpl::DestroyCurrentThread(void* thread) { |
232 WebThreadImplForMessageLoop* impl = | 224 WebThreadImplForMessageLoop* impl = |
233 static_cast<WebThreadImplForMessageLoop*>(thread); | 225 static_cast<WebThreadImplForMessageLoop*>(thread); |
234 delete impl; | 226 delete impl; |
235 } | 227 } |
236 | 228 |
237 } // namespace mojo | 229 } // namespace mojo |
OLD | NEW |