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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/renderer_webkitplatformsupport_impl.h ('k') | ipc/ipc_message_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/renderer_webkitplatformsupport_impl.cc
diff --git a/content/renderer/renderer_webkitplatformsupport_impl.cc b/content/renderer/renderer_webkitplatformsupport_impl.cc
index 32a708655c01c73b0daf9f4ae3a617b0d896f12e..eea9169629911b1f668a982a316eedeeea79f54d 100644
--- a/content/renderer/renderer_webkitplatformsupport_impl.cc
+++ b/content/renderer/renderer_webkitplatformsupport_impl.cc
@@ -34,6 +34,7 @@
#include "content/renderer/websharedworkerrepository_impl.h"
#include "googleurl/src/gurl.h"
#include "ipc/ipc_sync_message_filter.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebBatteryMonitor.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebBlobRegistry.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileInfo.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
@@ -80,6 +81,7 @@
#endif
using WebKit::WebAudioDevice;
+using WebKit::WebBatteryMonitor;
using WebKit::WebBlobRegistry;
using WebKit::WebFileInfo;
using WebKit::WebFileSystem;
@@ -725,6 +727,16 @@ RendererWebKitPlatformSupportImpl::createMediaStreamCenter(
return render_thread->CreateMediaStreamCenter(client);
}
+//------------------------------------------------------------------------------
+
+WebBatteryMonitor* RendererWebKitPlatformSupportImpl::batteryMonitor() {
+ RenderThreadImpl* render_thread = RenderThreadImpl::current();
+ DCHECK(render_thread);
+ if (!render_thread)
+ return NULL;
+ return render_thread->GetBatteryMonitor();
+}
+
// static
bool RendererWebKitPlatformSupportImpl::SetSandboxEnabledForTesting(
bool enable) {
« 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