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

Side by Side Diff: components/mus/example/common/mus_views_init.h

Issue 1390353007: Adds MUSViewsInit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix windows 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/common/DEPS ('k') | components/mus/example/common/mus_views_init.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_MUS_EXAMPLE_COMMON_MUS_VIEWS_INIT_H_
6 #define COMPONENTS_MUS_EXAMPLE_COMMON_MUS_VIEWS_INIT_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "components/mus/public/cpp/view_tree_delegate.h"
10 #include "ui/views/views_delegate.h"
11
12 namespace mandoline {
13 class AuraInit;
14 }
15
16 namespace mojo {
17 class ApplicationImpl;
18 }
19
20 // Does the necessary setup to use mus, views and the example wm.
21 class MUSViewsInit : public views::ViewsDelegate, public mus::ViewTreeDelegate {
22 public:
23 explicit MUSViewsInit(mojo::ApplicationImpl* app);
24 ~MUSViewsInit() override;
25
26 private:
27 mus::View* CreateWindow();
28
29 // views::ViewsDelegate:
30 views::NativeWidget* CreateNativeWidget(
31 views::internal::NativeWidgetDelegate* delegate) override;
32 void OnBeforeWidgetInit(
33 views::Widget::InitParams* params,
34 views::internal::NativeWidgetDelegate* delegate) override;
35
36 // mus::ViewTreeDelegate:
37 void OnEmbed(mus::View* root) override;
38 void OnConnectionLost(mus::ViewTreeConnection* connection) override;
39 #if defined(OS_WIN)
40 HICON GetSmallWindowIcon() const override;
41 #endif
42
43 mojo::ApplicationImpl* app_;
44
45 scoped_ptr<mandoline::AuraInit> aura_init_;
46
47 DISALLOW_COPY_AND_ASSIGN(MUSViewsInit);
48 };
49
50 #endif // COMPONENTS_MUS_EXAMPLE_COMMON_MUS_VIEWS_INIT_H_
OLDNEW
« no previous file with comments | « components/mus/example/common/DEPS ('k') | components/mus/example/common/mus_views_init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698