Commit 8a064978 authored by ckocagil's avatar ckocagil Committed by Commit bot

Create PowerMonitor while starting aura_demo and views_examples_exe

R=sky

Review URL: https://codereview.chromium.org/910453002

Cr-Commit-Position: refs/heads/master@{#315325}
parent 2310fc2b
......@@ -7,6 +7,8 @@
#include "base/i18n/icu_util.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/power_monitor/power_monitor.h"
#include "base/power_monitor/power_monitor_device_source.h"
#include "third_party/skia/include/core/SkXfermode.h"
#include "ui/aura/client/default_capture_client.h"
#include "ui/aura/client/window_tree_client.h"
......@@ -126,6 +128,9 @@ int DemoMain() {
// Create the message-loop here before creating the root window.
base::MessageLoopForUI message_loop;
base::PowerMonitor power_monitor(make_scoped_ptr(
new base::PowerMonitorDeviceSource));
aura::Env::CreateInstance(true);
aura::Env::GetInstance()->set_context_factory(context_factory.get());
scoped_ptr<aura::TestScreen> test_screen(
......
......@@ -8,6 +8,8 @@
#include "base/i18n/icu_util.h"
#include "base/message_loop/message_loop.h"
#include "base/path_service.h"
#include "base/power_monitor/power_monitor.h"
#include "base/power_monitor/power_monitor_device_source.h"
#include "base/run_loop.h"
#include "ui/base/ime/input_method_initializer.h"
#include "ui/base/resource/resource_bundle.h"
......@@ -70,6 +72,9 @@ int main(int argc, char** argv) {
DCHECK(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path));
ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);
base::PowerMonitor power_monitor(make_scoped_ptr(
new base::PowerMonitorDeviceSource));
#if defined(OS_WIN)
gfx::win::MaybeInitializeDirectWrite();
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment