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

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

Issue 10024013: chromeos: Add support for the battery status API on chromeos. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/renderer_webkitplatformsupport_impl.h ('k') | ipc/ipc_message_utils.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 (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/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 16 matching lines...) Expand all
27 #include "content/renderer/gamepad_shared_memory_reader.h" 27 #include "content/renderer/gamepad_shared_memory_reader.h"
28 #include "content/renderer/media/audio_device.h" 28 #include "content/renderer/media/audio_device.h"
29 #include "content/renderer/media/audio_hardware.h" 29 #include "content/renderer/media/audio_hardware.h"
30 #include "content/renderer/media/renderer_webaudiodevice_impl.h" 30 #include "content/renderer/media/renderer_webaudiodevice_impl.h"
31 #include "content/renderer/render_thread_impl.h" 31 #include "content/renderer/render_thread_impl.h"
32 #include "content/renderer/render_view_impl.h" 32 #include "content/renderer/render_view_impl.h"
33 #include "content/renderer/renderer_clipboard_client.h" 33 #include "content/renderer/renderer_clipboard_client.h"
34 #include "content/renderer/websharedworkerrepository_impl.h" 34 #include "content/renderer/websharedworkerrepository_impl.h"
35 #include "googleurl/src/gurl.h" 35 #include "googleurl/src/gurl.h"
36 #include "ipc/ipc_sync_message_filter.h" 36 #include "ipc/ipc_sync_message_filter.h"
37 #include "third_party/WebKit/Source/WebKit/chromium/public/WebBatteryMonitor.h"
37 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebBlobRegis try.h" 38 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebBlobRegis try.h"
38 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileInfo.h" 39 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileInfo.h"
39 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" 40 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
40 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGamepads. h" 41 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGamepads. h"
41 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBFactory.h" 42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBFactory.h"
42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKey.h" 43 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKey.h"
43 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKeyPath.h" 44 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKeyPath.h"
44 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStre amCenter.h" 45 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStre amCenter.h"
45 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStre amCenterClient.h" 46 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStre amCenterClient.h"
46 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConne ctionHandler.h" 47 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConne ctionHandler.h"
(...skipping 26 matching lines...) Expand all
73 #include "content/common/child_process_sandbox_support_impl_linux.h" 74 #include "content/common/child_process_sandbox_support_impl_linux.h"
74 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/linux/WebFon tFamily.h" 75 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/linux/WebFon tFamily.h"
75 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/linux/WebSan dboxSupport.h" 76 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/linux/WebSan dboxSupport.h"
76 #endif 77 #endif
77 78
78 #if defined(OS_POSIX) 79 #if defined(OS_POSIX)
79 #include "base/file_descriptor_posix.h" 80 #include "base/file_descriptor_posix.h"
80 #endif 81 #endif
81 82
82 using WebKit::WebAudioDevice; 83 using WebKit::WebAudioDevice;
84 using WebKit::WebBatteryMonitor;
83 using WebKit::WebBlobRegistry; 85 using WebKit::WebBlobRegistry;
84 using WebKit::WebFileInfo; 86 using WebKit::WebFileInfo;
85 using WebKit::WebFileSystem; 87 using WebKit::WebFileSystem;
86 using WebKit::WebFrame; 88 using WebKit::WebFrame;
87 using WebKit::WebGamepads; 89 using WebKit::WebGamepads;
88 using WebKit::WebIDBFactory; 90 using WebKit::WebIDBFactory;
89 using WebKit::WebIDBKey; 91 using WebKit::WebIDBKey;
90 using WebKit::WebIDBKeyPath; 92 using WebKit::WebIDBKeyPath;
91 using WebKit::WebKitPlatformSupport; 93 using WebKit::WebKitPlatformSupport;
92 using WebKit::WebMediaStreamCenter; 94 using WebKit::WebMediaStreamCenter;
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 WebMediaStreamCenter* 720 WebMediaStreamCenter*
719 RendererWebKitPlatformSupportImpl::createMediaStreamCenter( 721 RendererWebKitPlatformSupportImpl::createMediaStreamCenter(
720 WebMediaStreamCenterClient* client) { 722 WebMediaStreamCenterClient* client) {
721 RenderThreadImpl* render_thread = RenderThreadImpl::current(); 723 RenderThreadImpl* render_thread = RenderThreadImpl::current();
722 DCHECK(render_thread); 724 DCHECK(render_thread);
723 if (!render_thread) 725 if (!render_thread)
724 return NULL; 726 return NULL;
725 return render_thread->CreateMediaStreamCenter(client); 727 return render_thread->CreateMediaStreamCenter(client);
726 } 728 }
727 729
730 //------------------------------------------------------------------------------
731
732 WebBatteryMonitor* RendererWebKitPlatformSupportImpl::batteryMonitor() {
733 RenderThreadImpl* render_thread = RenderThreadImpl::current();
734 DCHECK(render_thread);
735 if (!render_thread)
736 return NULL;
737 return render_thread->GetBatteryMonitor();
738 }
739
728 // static 740 // static
729 bool RendererWebKitPlatformSupportImpl::SetSandboxEnabledForTesting( 741 bool RendererWebKitPlatformSupportImpl::SetSandboxEnabledForTesting(
730 bool enable) { 742 bool enable) {
731 bool was_enabled = g_sandbox_enabled; 743 bool was_enabled = g_sandbox_enabled;
732 g_sandbox_enabled = enable; 744 g_sandbox_enabled = enable;
733 return was_enabled; 745 return was_enabled;
734 } 746 }
735 747
736 GpuChannelHostFactory* 748 GpuChannelHostFactory*
737 RendererWebKitPlatformSupportImpl::GetGpuChannelHostFactory() { 749 RendererWebKitPlatformSupportImpl::GetGpuChannelHostFactory() {
738 return RenderThreadImpl::current(); 750 return RenderThreadImpl::current();
739 } 751 }
OLDNEW
« no previous file with comments | « content/renderer/renderer_webkitplatformsupport_impl.h ('k') | ipc/ipc_message_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698