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

Unified Diff: content/renderer/render_view_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: file-move Created 8 years, 8 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
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index b498938ad257d928dec60703ff296a4d797e925e..b3739885a31df696a1cff8735970a5945717cf92 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -53,6 +53,7 @@
#include "content/public/renderer/navigation_state.h"
#include "content/public/renderer/render_view_observer.h"
#include "content/public/renderer/render_view_visitor.h"
+#include "content/renderer/battery_status_dispatcher.h"
#include "content/renderer/device_orientation_dispatcher.h"
#include "content/renderer/devtools_agent.h"
#include "content/renderer/dom_automation_controller.h"
@@ -456,6 +457,7 @@ RenderViewImpl::RenderViewImpl(
geolocation_dispatcher_(NULL),
input_tag_speech_dispatcher_(NULL),
device_orientation_dispatcher_(NULL),
+ battery_status_dispatcher_(NULL),
media_stream_dispatcher_(NULL),
p2p_socket_dispatcher_(NULL),
devtools_agent_(NULL),
@@ -5090,6 +5092,12 @@ WebKit::WebDeviceOrientationClient* RenderViewImpl::deviceOrientationClient() {
return device_orientation_dispatcher_;
}
+WebKit::WebBatteryStatusClient* RenderViewImpl::batteryStatusClient() {
+ if (!battery_status_dispatcher_)
+ battery_status_dispatcher_ = new BatteryStatusDispatcher(this);
+ return battery_status_dispatcher_;
+}
+
void RenderViewImpl::zoomLimitsChanged(double minimum_level,
double maximum_level) {
// For now, don't remember plugin zoom values. We don't want to mix them with

Powered by Google App Engine
This is Rietveld 408576698