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

Side by Side Diff: content/renderer/renderer_webkitplatformsupport_impl.cc

Issue 14678012: Implement the content/renderer and content/browser part of the Device Motion API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compilation: peer_handle -> PeerHandle() Created 7 years, 5 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/renderer/renderer_webkitplatformsupport_impl.h" 5 #include "content/renderer/renderer_webkitplatformsupport_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
11 #include "base/metrics/histogram.h" 11 #include "base/metrics/histogram.h"
12 #include "base/platform_file.h" 12 #include "base/platform_file.h"
13 #include "base/shared_memory.h" 13 #include "base/shared_memory.h"
14 #include "base/strings/string_number_conversions.h" 14 #include "base/strings/string_number_conversions.h"
15 #include "base/strings/utf_string_conversions.h" 15 #include "base/strings/utf_string_conversions.h"
16 #include "content/child/database_util.h" 16 #include "content/child/database_util.h"
17 #include "content/child/fileapi/webfilesystem_impl.h" 17 #include "content/child/fileapi/webfilesystem_impl.h"
18 #include "content/child/indexed_db/proxy_webidbfactory_impl.h" 18 #include "content/child/indexed_db/proxy_webidbfactory_impl.h"
19 #include "content/child/npobject_util.h" 19 #include "content/child/npobject_util.h"
20 #include "content/child/thread_safe_sender.h" 20 #include "content/child/thread_safe_sender.h"
21 #include "content/child/webblobregistry_impl.h" 21 #include "content/child/webblobregistry_impl.h"
22 #include "content/child/webmessageportchannel_impl.h" 22 #include "content/child/webmessageportchannel_impl.h"
23 #include "content/common/file_utilities_messages.h" 23 #include "content/common/file_utilities_messages.h"
24 #include "content/common/gpu/client/context_provider_command_buffer.h" 24 #include "content/common/gpu/client/context_provider_command_buffer.h"
25 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" 25 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
26 #include "content/common/mime_registry_messages.h" 26 #include "content/common/mime_registry_messages.h"
27 #include "content/common/view_messages.h" 27 #include "content/common/view_messages.h"
28 #include "content/public/common/content_switches.h" 28 #include "content/public/common/content_switches.h"
29 #include "content/public/renderer/content_renderer_client.h" 29 #include "content/public/renderer/content_renderer_client.h"
30 #include "content/renderer/device_orientation/device_motion_event_pump.h"
30 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" 31 #include "content/renderer/dom_storage/webstoragenamespace_impl.h"
31 #include "content/renderer/gamepad_shared_memory_reader.h" 32 #include "content/renderer/gamepad_shared_memory_reader.h"
32 #include "content/renderer/hyphenator/hyphenator.h" 33 #include "content/renderer/hyphenator/hyphenator.h"
33 #include "content/renderer/media/media_stream_dependency_factory.h" 34 #include "content/renderer/media/media_stream_dependency_factory.h"
34 #include "content/renderer/media/renderer_webaudiodevice_impl.h" 35 #include "content/renderer/media/renderer_webaudiodevice_impl.h"
35 #include "content/renderer/media/renderer_webmidiaccessor_impl.h" 36 #include "content/renderer/media/renderer_webmidiaccessor_impl.h"
36 #include "content/renderer/media/webcontentdecryptionmodule_impl.h" 37 #include "content/renderer/media/webcontentdecryptionmodule_impl.h"
37 #include "content/renderer/render_thread_impl.h" 38 #include "content/renderer/render_thread_impl.h"
38 #include "content/renderer/renderer_clipboard_client.h" 39 #include "content/renderer/renderer_clipboard_client.h"
39 #include "content/renderer/webclipboard_impl.h" 40 #include "content/renderer/webclipboard_impl.h"
(...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after
1049 } 1050 }
1050 1051
1051 //------------------------------------------------------------------------------ 1052 //------------------------------------------------------------------------------
1052 1053
1053 WebKit::WebString RendererWebKitPlatformSupportImpl::convertIDNToUnicode( 1054 WebKit::WebString RendererWebKitPlatformSupportImpl::convertIDNToUnicode(
1054 const WebKit::WebString& host, 1055 const WebKit::WebString& host,
1055 const WebKit::WebString& languages) { 1056 const WebKit::WebString& languages) {
1056 return net::IDNToUnicode(host.utf8(), languages.utf8()); 1057 return net::IDNToUnicode(host.utf8(), languages.utf8());
1057 } 1058 }
1058 1059
1060 //------------------------------------------------------------------------------
1061
1062 void RendererWebKitPlatformSupportImpl::setDeviceMotionListener(
1063 WebKit::WebDeviceMotionListener* listener) {
1064 if (!device_motion_event_pump_) {
1065 device_motion_event_pump_.reset(new DeviceMotionEventPump);
1066 device_motion_event_pump_->Attach(RenderThreadImpl::current());
1067 }
1068 device_motion_event_pump_->SetListener(listener);
1069 }
1070
1059 } // namespace content 1071 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/renderer_webkitplatformsupport_impl.h ('k') | content/renderer/shared_memory_seqlock_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698