summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-04-17 13:03:07 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2013-04-17 13:03:07 +0200
commitae721233f53276bbb5f731ab975e10b2d366872f (patch)
tree7e84c1ba9953fdb6849d5343afbafe900abdcc41 /lib
parent528d134f77ff3a607d3a10ff45f824c12d77af23 (diff)
Some more init code and figure out debug vs. release for the example linkage
Diffstat (limited to 'lib')
-rw-r--r--lib/blinqpage.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/blinqpage.cpp b/lib/blinqpage.cpp
index d66abd3f0..907f53ead 100644
--- a/lib/blinqpage.cpp
+++ b/lib/blinqpage.cpp
@@ -18,6 +18,8 @@
#include "ui/aura/root_window_host_delegate.h"
#include "ui/gfx/insets.h"
#include "base/message_loop.h"
+#include "ui/views/widget/desktop_aura/desktop_screen.h"
+#include "ui/gfx/screen.h"
#include <QByteArray>
#include <QWindow>
@@ -281,13 +283,19 @@ public:
BlinqPage::BlinqPage()
{
- if (!base::MessageLoop::current())
- (void)new base::MessageLoopForUI();
static content::ContentMainRunner *runner = 0;
if (!runner) {
runner = content::ContentMainRunner::Create();
runner->Initialize(0, 0, 0);
}
+ if (!base::MessageLoop::current())
+ (void)new base::MessageLoopForUI();
+
+ static bool init = false;
+ if (!init) {
+ init = true;
+ gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, views::CreateDesktopScreen());
+ }
d.reset(new BlinqPagePrivate);
d->rootWindowHost.reset(new RootWindowHostQt);
@@ -298,6 +306,7 @@ BlinqPage::BlinqPage()
}
d->context.reset(new Context);
d->contents.reset(content::WebContents::Create(content::WebContents::CreateParams(d->context.get())));
+ d->rootWindow->Init();
d->rootWindow->AddChild(d->contents->GetView()->GetNativeView());
}