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

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: . 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 58a36217bbac33b30d8b555c0b87718c27edd94c..17bc459874a3d79ca795863b363bc387541dec5b 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"
@@ -457,6 +458,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),
@@ -5091,6 +5093,12 @@ WebKit::WebDeviceOrientationClient* RenderViewImpl::deviceOrientationClient() {
return device_orientation_dispatcher_;
}
+WebKit::WebBatteryStatusClient* RenderViewImpl::batteryStatusClient() {
+ if (!battery_status_dispatcher_)
+ battery_status_dispatcher_ = new content::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