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

Side by Side Diff: components/html_viewer/blink_platform_impl.cc

Issue 1186933004: Implement Platform::getUniqueIdForProcess. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add to components/html_viewer/blink_platform_impl.cc Created 5 years, 6 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/html_viewer/blink_platform_impl.h ('k') | content/child/blink_platform_impl.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 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 "components/html_viewer/blink_platform_impl.h" 5 #include "components/html_viewer/blink_platform_impl.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/rand_util.h" 10 #include "base/rand_util.h"
11 #include "base/stl_util.h" 11 #include "base/stl_util.h"
12 #include "base/synchronization/waitable_event.h" 12 #include "base/synchronization/waitable_event.h"
13 #include "base/thread_task_runner_handle.h" 13 #include "base/thread_task_runner_handle.h"
14 #include "base/threading/platform_thread.h" 14 #include "base/threading/platform_thread.h"
15 #include "base/time/time.h" 15 #include "base/time/time.h"
16 #include "base/trace_event/trace_event.h"
16 #include "components/html_viewer/blink_resource_constants.h" 17 #include "components/html_viewer/blink_resource_constants.h"
17 #include "components/html_viewer/web_clipboard_impl.h" 18 #include "components/html_viewer/web_clipboard_impl.h"
18 #include "components/html_viewer/web_cookie_jar_impl.h" 19 #include "components/html_viewer/web_cookie_jar_impl.h"
19 #include "components/html_viewer/web_socket_handle_impl.h" 20 #include "components/html_viewer/web_socket_handle_impl.h"
20 #include "components/html_viewer/web_url_loader_impl.h" 21 #include "components/html_viewer/web_url_loader_impl.h"
21 #include "components/message_port/web_message_port_channel_impl.h" 22 #include "components/message_port/web_message_port_channel_impl.h"
22 #include "components/mime_util/mime_util.h" 23 #include "components/mime_util/mime_util.h"
23 #include "components/scheduler/child/webthread_impl_for_worker_scheduler.h" 24 #include "components/scheduler/child/webthread_impl_for_worker_scheduler.h"
24 #include "components/scheduler/renderer/renderer_scheduler.h" 25 #include "components/scheduler/renderer/renderer_scheduler.h"
25 #include "components/scheduler/renderer/webthread_impl_for_renderer_scheduler.h" 26 #include "components/scheduler/renderer/webthread_impl_for_renderer_scheduler.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 } 127 }
127 128
128 bool BlinkPlatformImpl::isThreadedCompositingEnabled() { 129 bool BlinkPlatformImpl::isThreadedCompositingEnabled() {
129 return true; 130 return true;
130 } 131 }
131 132
132 blink::WebCompositorSupport* BlinkPlatformImpl::compositorSupport() { 133 blink::WebCompositorSupport* BlinkPlatformImpl::compositorSupport() {
133 return &compositor_support_; 134 return &compositor_support_;
134 } 135 }
135 136
137 uint32_t BlinkPlatformImpl::getUniqueIdForProcess() {
138 // TODO(rickyz): Replace this with base::GetUniqueIdForProcess when that's
139 // ready.
140 return base::trace_event::TraceLog::GetInstance()->process_id();
141 }
142
136 void BlinkPlatformImpl::createMessageChannel( 143 void BlinkPlatformImpl::createMessageChannel(
137 blink::WebMessagePortChannel** channel1, 144 blink::WebMessagePortChannel** channel1,
138 blink::WebMessagePortChannel** channel2) { 145 blink::WebMessagePortChannel** channel2) {
139 message_port::WebMessagePortChannelImpl::CreatePair(channel1, channel2); 146 message_port::WebMessagePortChannelImpl::CreatePair(channel1, channel2);
140 } 147 }
141 148
142 blink::WebScrollbarBehavior* BlinkPlatformImpl::scrollbarBehavior() { 149 blink::WebScrollbarBehavior* BlinkPlatformImpl::scrollbarBehavior() {
143 return &scrollbar_behavior_; 150 return &scrollbar_behavior_;
144 } 151 }
145 152
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 BlinkPlatformImpl::notificationManager() { 273 BlinkPlatformImpl::notificationManager() {
267 return &web_notification_manager_; 274 return &web_notification_manager_;
268 } 275 }
269 276
270 void BlinkPlatformImpl::UpdateWebThreadTLS(blink::WebThread* thread) { 277 void BlinkPlatformImpl::UpdateWebThreadTLS(blink::WebThread* thread) {
271 DCHECK(!current_thread_slot_.Get()); 278 DCHECK(!current_thread_slot_.Get());
272 current_thread_slot_.Set(thread); 279 current_thread_slot_.Set(thread);
273 } 280 }
274 281
275 } // namespace html_viewer 282 } // namespace html_viewer
OLDNEW
« no previous file with comments | « components/html_viewer/blink_platform_impl.h ('k') | content/child/blink_platform_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698