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

Side by Side Diff: components/mus/example/views_examples/views_examples_application_delegate.cc

Issue 1407073002: Adds GetDisplays() to WindowManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge 2 trunk Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/mus/example/views_examples/views_examples_application_deleg ate.h" 5 #include "components/mus/example/views_examples/views_examples_application_deleg ate.h"
6 6
7 #include "components/mus/example/common/mus_views_init.h" 7 #include "components/mus/example/common/mus_views_init.h"
8 #include "mojo/application/public/cpp/application_connection.h" 8 #include "mojo/application/public/cpp/application_connection.h"
9 #include "mojo/application/public/cpp/application_impl.h" 9 #include "mojo/application/public/cpp/application_impl.h"
10 #include "ui/views/examples/example_base.h" 10 #include "ui/views/examples/example_base.h"
11 #include "ui/views/examples/examples_window.h" 11 #include "ui/views/examples/examples_window.h"
12 #include "ui/views/widget/widget_delegate.h"
13 12
14 ViewsExamplesApplicationDelegate::ViewsExamplesApplicationDelegate() 13 ViewsExamplesApplicationDelegate::ViewsExamplesApplicationDelegate()
15 : app_(nullptr) {} 14 : app_(nullptr) {}
16 15
17 ViewsExamplesApplicationDelegate::~ViewsExamplesApplicationDelegate() { 16 ViewsExamplesApplicationDelegate::~ViewsExamplesApplicationDelegate() {
18 } 17 }
19 18
20 void ViewsExamplesApplicationDelegate::Initialize(mojo::ApplicationImpl* app) { 19 void ViewsExamplesApplicationDelegate::Initialize(mojo::ApplicationImpl* app) {
21 app_ = app; 20 app_ = app;
22 21
23 mus_views_init_.reset(new MUSViewsInit(app)); 22 mus_views_init_.reset(new MUSViewsInit(app));
24 23
25 // TODO(sky): total hack! This is necessary as WindowTypeLauncherView is
26 // created before AuraInit. WindowTypeLauncherView uses resources that are
27 // configured by MUSViewsInit once a View is created. By creating a Widget
28 // here we ensure the necessary state has been setup.
29 views::Widget::CreateWindow(new views::WidgetDelegateView);
30
31 views::examples::ShowExamplesWindow(views::examples::DO_NOTHING_ON_CLOSE, 24 views::examples::ShowExamplesWindow(views::examples::DO_NOTHING_ON_CLOSE,
32 nullptr, nullptr); 25 nullptr, nullptr);
33 } 26 }
34 27
35 bool ViewsExamplesApplicationDelegate::ConfigureIncomingConnection( 28 bool ViewsExamplesApplicationDelegate::ConfigureIncomingConnection(
36 mojo::ApplicationConnection* connection) { 29 mojo::ApplicationConnection* connection) {
37 return false; 30 return false;
38 } 31 }
OLDNEW
« no previous file with comments | « components/mus/example/common/mus_views_init.cc ('k') | components/mus/example/window_type_launcher/window_type_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698