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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/example/common/mus_views_init.h
diff --git a/components/mus/example/common/mus_views_init.h b/components/mus/example/common/mus_views_init.h
new file mode 100644
index 0000000000000000000000000000000000000000..710020fe66710a39be0bdf0ccb3e6769494bb163
--- /dev/null
+++ b/components/mus/example/common/mus_views_init.h
@@ -0,0 +1,50 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_MUS_EXAMPLE_COMMON_MUS_VIEWS_INIT_H_
+#define COMPONENTS_MUS_EXAMPLE_COMMON_MUS_VIEWS_INIT_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "components/mus/public/cpp/view_tree_delegate.h"
+#include "ui/views/views_delegate.h"
+
+namespace mandoline {
+class AuraInit;
+}
+
+namespace mojo {
+class ApplicationImpl;
+}
+
+// Does the necessary setup to use mus, views and the example wm.
+class MUSViewsInit : public views::ViewsDelegate, public mus::ViewTreeDelegate {
+ public:
+ explicit MUSViewsInit(mojo::ApplicationImpl* app);
+ ~MUSViewsInit() override;
+
+ private:
+ mus::View* CreateWindow();
+
+ // views::ViewsDelegate:
+ views::NativeWidget* CreateNativeWidget(
+ views::internal::NativeWidgetDelegate* delegate) override;
+ void OnBeforeWidgetInit(
+ views::Widget::InitParams* params,
+ views::internal::NativeWidgetDelegate* delegate) override;
+
+ // mus::ViewTreeDelegate:
+ void OnEmbed(mus::View* root) override;
+ void OnConnectionLost(mus::ViewTreeConnection* connection) override;
+#if defined(OS_WIN)
+ HICON GetSmallWindowIcon() const override;
+#endif
+
+ mojo::ApplicationImpl* app_;
+
+ scoped_ptr<mandoline::AuraInit> aura_init_;
+
+ DISALLOW_COPY_AND_ASSIGN(MUSViewsInit);
+};
+
+#endif // COMPONENTS_MUS_EXAMPLE_COMMON_MUS_VIEWS_INIT_H_
« 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