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

Side by Side Diff: components/mus/example/client/client_application_delegate.cc

Issue 1406523003: Makes example use TYPE_WINDOW (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « components/mus/example/client/BUILD.gn ('k') | mandoline/ui/aura/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/client/client_application_delegate.h" 5 #include "components/mus/example/client/client_application_delegate.h"
6 6
7 #include "components/mus/example/wm/wm.mojom.h" 7 #include "components/mus/example/wm/wm.mojom.h"
8 #include "components/mus/public/cpp/view_tree_connection.h" 8 #include "components/mus/public/cpp/view_tree_connection.h"
9 #include "components/mus/public/cpp/view_tree_host_factory.h" 9 #include "components/mus/public/cpp/view_tree_host_factory.h"
10 #include "mandoline/ui/aura/aura_init.h" 10 #include "mandoline/ui/aura/aura_init.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 if (!aura_init_) { 44 if (!aura_init_) {
45 aura_init_.reset( 45 aura_init_.reset(
46 new mandoline::AuraInit(root, app_->shell(), "example_resources.pak")); 46 new mandoline::AuraInit(root, app_->shell(), "example_resources.pak"));
47 } 47 }
48 48
49 views::WidgetDelegateView* widget_delegate = new views::WidgetDelegateView; 49 views::WidgetDelegateView* widget_delegate = new views::WidgetDelegateView;
50 widget_delegate->GetContentsView()->set_background( 50 widget_delegate->GetContentsView()->set_background(
51 views::Background::CreateSolidBackground(0xFFDDDDDD)); 51 views::Background::CreateSolidBackground(0xFFDDDDDD));
52 52
53 views::Widget* widget = new views::Widget; 53 views::Widget* widget = new views::Widget;
54 // TODO(sky): make this TYPE_WINDOW. I need to fix resources in order to use 54 views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW);
55 // TYPE_WINDOW.
56 views::Widget::InitParams params(
57 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
58 params.delegate = widget_delegate; 55 params.delegate = widget_delegate;
59 params.native_widget = 56 params.native_widget =
60 new mandoline::NativeWidgetViewManager(widget, app_->shell(), root); 57 new mandoline::NativeWidgetViewManager(widget, app_->shell(), root);
61 params.bounds = root->bounds().To<gfx::Rect>(); 58 params.bounds = root->bounds().To<gfx::Rect>();
62 widget->Init(params); 59 widget->Init(params);
63 widget->Show(); 60 widget->Show();
64 } 61 }
65 62
66 void ClientApplicationDelegate::OnConnectionLost( 63 void ClientApplicationDelegate::OnConnectionLost(
67 mus::ViewTreeConnection* connection) {} 64 mus::ViewTreeConnection* connection) {}
OLDNEW
« no previous file with comments | « components/mus/example/client/BUILD.gn ('k') | mandoline/ui/aura/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698