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

Unified Diff: webkit/tools/test_shell/test_shell.cc

Issue 10959020: SystemMonitor refactoring: move power state monitor into a separate class called PowerMonitor (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: add power notifier Created 8 years, 2 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: webkit/tools/test_shell/test_shell.cc
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc
index 70954bfba3e969ad955eb9a25eff29767a6379e6..37b2c34ef850486a65e9da436340960aaf5fcd50 100644
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -57,6 +57,10 @@
#include "webkit/user_agent/user_agent.h"
#include "webkit/user_agent/user_agent_util.h"
+#if defined(OS_MACOSX)
+#include "base/power_monitor/power_monitor.h"
+#endif
+
using WebKit::WebCanvas;
using WebKit::WebFrame;
using WebKit::WebNavigationPolicy;
@@ -145,6 +149,10 @@ TestShell::TestShell()
allow_plugins_(true),
allow_scripts_(true),
dump_stats_table_on_exit_(false) {
+#if defined(OS_MACOSX)
+ // This needs to happen before PowerMonitor's ctor.
+ base::PowerMonitor::AllocateSystemIOPorts();
+#endif
delegate_.reset(new TestWebViewDelegate(this));
popup_delegate_.reset(new TestWebViewDelegate(this));
navigation_controller_.reset(new TestNavigationController(this));
« ui/views/win/hwnd_message_handler.cc ('K') | « webkit/glue/dom_operations_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698